Ruby 3.2.0dev (2022-06-11 revision 0e2c01bd094617f5c82759bdab03bb786ce89d56)
rb_mjit_min_header-2.6.7.h
1#ifdef __GNUC__
2# pragma GCC system_header
3#endif
4#define ALWAYS_INLINE(x) __attribute__ ((__always_inline__)) x
5
6typedef long unsigned int size_t;
7typedef __builtin_va_list __gnuc_va_list;
8typedef unsigned char __u_char;
9typedef unsigned short int __u_short;
10typedef unsigned int __u_int;
11typedef unsigned long int __u_long;
12typedef signed char __int8_t;
13typedef unsigned char __uint8_t;
14typedef signed short int __int16_t;
15typedef unsigned short int __uint16_t;
16typedef signed int __int32_t;
17typedef unsigned int __uint32_t;
18typedef signed long int __int64_t;
19typedef unsigned long int __uint64_t;
20typedef __int8_t __int_least8_t;
21typedef __uint8_t __uint_least8_t;
22typedef __int16_t __int_least16_t;
23typedef __uint16_t __uint_least16_t;
24typedef __int32_t __int_least32_t;
25typedef __uint32_t __uint_least32_t;
26typedef __int64_t __int_least64_t;
27typedef __uint64_t __uint_least64_t;
28typedef long int __quad_t;
29typedef unsigned long int __u_quad_t;
30typedef long int __intmax_t;
31typedef unsigned long int __uintmax_t;
32typedef unsigned long int __dev_t;
33typedef unsigned int __uid_t;
34typedef unsigned int __gid_t;
35typedef unsigned long int __ino_t;
36typedef unsigned long int __ino64_t;
37typedef unsigned int __mode_t;
38typedef unsigned long int __nlink_t;
39typedef long int __off_t;
40typedef long int __off64_t;
41typedef int __pid_t;
42typedef struct { int __val[2]; } __fsid_t;
43typedef long int __clock_t;
44typedef unsigned long int __rlim_t;
45typedef unsigned long int __rlim64_t;
46typedef unsigned int __id_t;
47typedef long int __time_t;
48typedef unsigned int __useconds_t;
49typedef long int __suseconds_t;
50typedef long int __suseconds64_t;
51typedef int __daddr_t;
52typedef int __key_t;
53typedef int __clockid_t;
54typedef void * __timer_t;
55typedef long int __blksize_t;
56typedef long int __blkcnt_t;
57typedef long int __blkcnt64_t;
58typedef unsigned long int __fsblkcnt_t;
59typedef unsigned long int __fsblkcnt64_t;
60typedef unsigned long int __fsfilcnt_t;
61typedef unsigned long int __fsfilcnt64_t;
62typedef long int __fsword_t;
63typedef long int __ssize_t;
64typedef long int __syscall_slong_t;
65typedef unsigned long int __syscall_ulong_t;
66typedef __off64_t __loff_t;
67typedef char *__caddr_t;
68typedef long int __intptr_t;
69typedef unsigned int __socklen_t;
70typedef int __sig_atomic_t;
71typedef struct
72{
73 int __count;
74 union
75 {
76 unsigned int __wch;
77 char __wchb[4];
78 } __value;
80typedef struct _G_fpos_t
81{
82 __off_t __pos;
83 __mbstate_t __state;
84} __fpos_t;
85typedef struct _G_fpos64_t
86{
87 __off64_t __pos;
88 __mbstate_t __state;
90struct _IO_FILE;
91typedef struct _IO_FILE __FILE;
92struct _IO_FILE;
93typedef struct _IO_FILE FILE;
94struct _IO_FILE;
95struct _IO_marker;
96struct _IO_codecvt;
97struct _IO_wide_data;
98typedef void _IO_lock_t;
100{
101 int _flags;
102 char *_IO_read_ptr;
103 char *_IO_read_end;
104 char *_IO_read_base;
105 char *_IO_write_base;
106 char *_IO_write_ptr;
107 char *_IO_write_end;
108 char *_IO_buf_base;
109 char *_IO_buf_end;
110 char *_IO_save_base;
111 char *_IO_backup_base;
112 char *_IO_save_end;
113 struct _IO_marker *_markers;
114 struct _IO_FILE *_chain;
115 int _fileno;
116 int _flags2;
117 __off_t _old_offset;
118 unsigned short _cur_column;
119 signed char _vtable_offset;
120 char _shortbuf[1];
121 _IO_lock_t *_lock;
122 __off64_t _offset;
123 struct _IO_codecvt *_codecvt;
124 struct _IO_wide_data *_wide_data;
125 struct _IO_FILE *_freeres_list;
126 void *_freeres_buf;
127 size_t __pad5;
128 int _mode;
129 char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)];
130};
131typedef __ssize_t cookie_read_function_t (void *__cookie, char *__buf,
132 size_t __nbytes);
133typedef __ssize_t cookie_write_function_t (void *__cookie, const char *__buf,
134 size_t __nbytes);
135typedef int cookie_seek_function_t (void *__cookie, __off64_t *__pos, int __w);
136typedef int cookie_close_function_t (void *__cookie);
138{
139 cookie_read_function_t *read;
140 cookie_write_function_t *write;
141 cookie_seek_function_t *seek;
142 cookie_close_function_t *close;
144typedef __gnuc_va_list va_list;
145typedef __off_t off_t;
146typedef __off64_t off64_t;
147typedef __ssize_t ssize_t;
148typedef __fpos_t fpos_t;
149typedef __fpos64_t fpos64_t;
150extern FILE *stdin;
151extern FILE *stdout;
152extern FILE *stderr;
153extern int remove (const char *__filename) __attribute__ ((__nothrow__ , __leaf__));
154extern int rename (const char *__old, const char *__new) __attribute__ ((__nothrow__ , __leaf__));
155extern int renameat (int __oldfd, const char *__old, int __newfd,
156 const char *__new) __attribute__ ((__nothrow__ , __leaf__));
157extern int renameat2 (int __oldfd, const char *__old, int __newfd,
158 const char *__new, unsigned int __flags) __attribute__ ((__nothrow__ , __leaf__));
159extern FILE *tmpfile (void) __attribute__ ((__warn_unused_result__));
160extern FILE *tmpfile64 (void) __attribute__ ((__warn_unused_result__));
161extern char *tmpnam (char *__s) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
162extern char *tmpnam_r (char *__s) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
163extern char *tempnam (const char *__dir, const char *__pfx)
164 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__));
165extern int fclose (FILE *__stream);
166extern int fflush (FILE *__stream);
167extern int fflush_unlocked (FILE *__stream);
168extern int fcloseall (void);
169extern FILE *fopen (const char *__restrict __filename,
170 const char *__restrict __modes) __attribute__ ((__warn_unused_result__));
171extern FILE *freopen (const char *__restrict __filename,
172 const char *__restrict __modes,
173 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
174extern FILE *fopen64 (const char *__restrict __filename,
175 const char *__restrict __modes) __attribute__ ((__warn_unused_result__));
176extern FILE *freopen64 (const char *__restrict __filename,
177 const char *__restrict __modes,
178 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
179extern FILE *fdopen (int __fd, const char *__modes) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
180extern FILE *fopencookie (void *__restrict __magic_cookie,
181 const char *__restrict __modes,
182 cookie_io_functions_t __io_funcs) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
183extern FILE *fmemopen (void *__s, size_t __len, const char *__modes)
184 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
185extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
186extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__));
187extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf,
188 int __modes, size_t __n) __attribute__ ((__nothrow__ , __leaf__));
189extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf,
190 size_t __size) __attribute__ ((__nothrow__ , __leaf__));
191extern void setlinebuf (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__));
192extern int fprintf (FILE *__restrict __stream,
193 const char *__restrict __format, ...);
194extern int printf (const char *__restrict __format, ...);
195extern int sprintf (char *__restrict __s,
196 const char *__restrict __format, ...) __attribute__ ((__nothrow__));
197extern int vfprintf (FILE *__restrict __s, const char *__restrict __format,
198 __gnuc_va_list __arg);
199extern int vprintf (const char *__restrict __format, __gnuc_va_list __arg);
200extern int vsprintf (char *__restrict __s, const char *__restrict __format,
201 __gnuc_va_list __arg) __attribute__ ((__nothrow__));
202extern int snprintf (char *__restrict __s, size_t __maxlen,
203 const char *__restrict __format, ...)
204 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4)));
205extern int vsnprintf (char *__restrict __s, size_t __maxlen,
206 const char *__restrict __format, __gnuc_va_list __arg)
207 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0)));
208extern int vasprintf (char **__restrict __ptr, const char *__restrict __f,
209 __gnuc_va_list __arg)
210 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 0))) __attribute__ ((__warn_unused_result__));
211extern int __asprintf (char **__restrict __ptr,
212 const char *__restrict __fmt, ...)
213 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__));
214extern int asprintf (char **__restrict __ptr,
215 const char *__restrict __fmt, ...)
216 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__));
217extern int vdprintf (int __fd, const char *__restrict __fmt,
218 __gnuc_va_list __arg)
219 __attribute__ ((__format__ (__printf__, 2, 0)));
220extern int dprintf (int __fd, const char *__restrict __fmt, ...)
221 __attribute__ ((__format__ (__printf__, 2, 3)));
222extern int fscanf (FILE *__restrict __stream,
223 const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__));
224extern int scanf (const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__));
225extern int sscanf (const char *__restrict __s,
226 const char *__restrict __format, ...) __attribute__ ((__nothrow__ , __leaf__));
227extern int fscanf (FILE *__restrict __stream, const char *__restrict __format, ...) __asm__ ("" "__isoc99_fscanf") __attribute__ ((__warn_unused_result__));
228extern int scanf (const char *__restrict __format, ...) __asm__ ("" "__isoc99_scanf") __attribute__ ((__warn_unused_result__));
229extern int sscanf (const char *__restrict __s, const char *__restrict __format, ...) __asm__ ("" "__isoc99_sscanf") __attribute__ ((__nothrow__ , __leaf__));
230extern int vfscanf (FILE *__restrict __s, const char *__restrict __format,
231 __gnuc_va_list __arg)
232 __attribute__ ((__format__ (__scanf__, 2, 0))) __attribute__ ((__warn_unused_result__));
233extern int vscanf (const char *__restrict __format, __gnuc_va_list __arg)
234 __attribute__ ((__format__ (__scanf__, 1, 0))) __attribute__ ((__warn_unused_result__));
235extern int vsscanf (const char *__restrict __s,
236 const char *__restrict __format, __gnuc_va_list __arg)
237 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__format__ (__scanf__, 2, 0)));
238extern int vfscanf (FILE *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vfscanf")
239 __attribute__ ((__format__ (__scanf__, 2, 0))) __attribute__ ((__warn_unused_result__));
240extern int vscanf (const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vscanf")
241 __attribute__ ((__format__ (__scanf__, 1, 0))) __attribute__ ((__warn_unused_result__));
242extern int vsscanf (const char *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vsscanf") __attribute__ ((__nothrow__ , __leaf__))
243 __attribute__ ((__format__ (__scanf__, 2, 0)));
244extern int fgetc (FILE *__stream);
245extern int getc (FILE *__stream);
246extern int getchar (void);
247extern int getc_unlocked (FILE *__stream);
248extern int getchar_unlocked (void);
249extern int fgetc_unlocked (FILE *__stream);
250extern int fputc (int __c, FILE *__stream);
251extern int putc (int __c, FILE *__stream);
252extern int putchar (int __c);
253extern int fputc_unlocked (int __c, FILE *__stream);
254extern int putc_unlocked (int __c, FILE *__stream);
255extern int putchar_unlocked (int __c);
256extern int getw (FILE *__stream);
257extern int putw (int __w, FILE *__stream);
258extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
259 __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 2)));
260extern char *fgets_unlocked (char *__restrict __s, int __n,
261 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__))
262 __attribute__ ((__access__ (__write_only__, 1, 2)));
263extern __ssize_t __getdelim (char **__restrict __lineptr,
264 size_t *__restrict __n, int __delimiter,
265 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
266extern __ssize_t getdelim (char **__restrict __lineptr,
267 size_t *__restrict __n, int __delimiter,
268 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
269extern __ssize_t getline (char **__restrict __lineptr,
270 size_t *__restrict __n,
271 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
272extern int fputs (const char *__restrict __s, FILE *__restrict __stream);
273extern int puts (const char *__s);
274extern int ungetc (int __c, FILE *__stream);
275extern size_t fread (void *__restrict __ptr, size_t __size,
276 size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
277extern size_t fwrite (const void *__restrict __ptr, size_t __size,
278 size_t __n, FILE *__restrict __s);
279extern int fputs_unlocked (const char *__restrict __s,
280 FILE *__restrict __stream);
281extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
282 size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
283extern size_t fwrite_unlocked (const void *__restrict __ptr, size_t __size,
284 size_t __n, FILE *__restrict __stream);
285extern int fseek (FILE *__stream, long int __off, int __whence);
286extern long int ftell (FILE *__stream) __attribute__ ((__warn_unused_result__));
287extern void rewind (FILE *__stream);
288extern int fseeko (FILE *__stream, __off_t __off, int __whence);
289extern __off_t ftello (FILE *__stream) __attribute__ ((__warn_unused_result__));
290extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos);
291extern int fsetpos (FILE *__stream, const fpos_t *__pos);
292extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence);
293extern __off64_t ftello64 (FILE *__stream) __attribute__ ((__warn_unused_result__));
294extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos);
295extern int fsetpos64 (FILE *__stream, const fpos64_t *__pos);
296extern void clearerr (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__));
297extern int feof (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
298extern int ferror (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
299extern void clearerr_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__));
300extern int feof_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
301extern int ferror_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
302extern void perror (const char *__s);
303extern int fileno (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
304extern int fileno_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
305extern FILE *popen (const char *__command, const char *__modes) __attribute__ ((__warn_unused_result__));
306extern int pclose (FILE *__stream);
307extern char *ctermid (char *__s) __attribute__ ((__nothrow__ , __leaf__));
308extern char *cuserid (char *__s);
309struct obstack;
310extern int obstack_printf (struct obstack *__restrict __obstack,
311 const char *__restrict __format, ...)
312 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3)));
313extern int obstack_vprintf (struct obstack *__restrict __obstack,
314 const char *__restrict __format,
315 __gnuc_va_list __args)
316 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 0)));
317extern void flockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__));
318extern int ftrylockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
319extern void funlockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__));
320extern int __uflow (FILE *);
321extern int __overflow (FILE *, int);
322extern __inline __attribute__ ((__gnu_inline__)) int
323getchar (void)
324{
325 return getc (stdin);
326}
327extern __inline __attribute__ ((__gnu_inline__)) int
328fgetc_unlocked (FILE *__fp)
329{
330 return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++);
331}
332extern __inline __attribute__ ((__gnu_inline__)) int
333getc_unlocked (FILE *__fp)
334{
335 return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++);
336}
337extern __inline __attribute__ ((__gnu_inline__)) int
338getchar_unlocked (void)
339{
340 return (__builtin_expect (((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end), 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++);
341}
342extern __inline __attribute__ ((__gnu_inline__)) int
343putchar (int __c)
344{
345 return putc (__c, stdout);
346}
347extern __inline __attribute__ ((__gnu_inline__)) int
348fputc_unlocked (int __c, FILE *__stream)
349{
350 return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c)));
351}
352extern __inline __attribute__ ((__gnu_inline__)) int
353putc_unlocked (int __c, FILE *__stream)
354{
355 return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c)));
356}
357extern __inline __attribute__ ((__gnu_inline__)) int
358putchar_unlocked (int __c)
359{
360 return (__builtin_expect (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end), 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c)));
361}
362extern __inline __attribute__ ((__gnu_inline__)) __ssize_t
363getline (char **__lineptr, size_t *__n, FILE *__stream)
364{
365 return __getdelim (__lineptr, __n, '\n', __stream);
366}
367extern __inline __attribute__ ((__gnu_inline__)) int
368__attribute__ ((__nothrow__ , __leaf__)) feof_unlocked (FILE *__stream)
369{
370 return (((__stream)->_flags & 0x0010) != 0);
371}
372extern __inline __attribute__ ((__gnu_inline__)) int
373__attribute__ ((__nothrow__ , __leaf__)) ferror_unlocked (FILE *__stream)
374{
375 return (((__stream)->_flags & 0x0020) != 0);
376}
377extern int __sprintf_chk (char *__restrict __s, int __flag, size_t __slen,
378 const char *__restrict __format, ...) __attribute__ ((__nothrow__ , __leaf__))
379 __attribute__ ((__access__ (__write_only__, 1, 3)));
380extern int __vsprintf_chk (char *__restrict __s, int __flag, size_t __slen,
381 const char *__restrict __format,
382 __gnuc_va_list __ap) __attribute__ ((__nothrow__ , __leaf__))
383 __attribute__ ((__access__ (__write_only__, 1, 3)));
384extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
385__attribute__ ((__nothrow__ , __leaf__)) sprintf (char *__restrict __s, const char *__restrict __fmt, ...)
386{
387 return __builtin___sprintf_chk (__s, 2 - 1,
388 __builtin_object_size (__s, 2 > 1), __fmt, __builtin_va_arg_pack ());
389}
390extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
391__attribute__ ((__nothrow__ , __leaf__)) vsprintf (char *__restrict __s, const char *__restrict __fmt, __gnuc_va_list __ap)
392{
393 return __builtin___vsprintf_chk (__s, 2 - 1,
394 __builtin_object_size (__s, 2 > 1), __fmt, __ap);
395}
396extern int __snprintf_chk (char *__restrict __s, size_t __n, int __flag,
397 size_t __slen, const char *__restrict __format,
398 ...) __attribute__ ((__nothrow__ , __leaf__))
399 __attribute__ ((__access__ (__write_only__, 1, 2)));
400extern int __vsnprintf_chk (char *__restrict __s, size_t __n, int __flag,
401 size_t __slen, const char *__restrict __format,
402 __gnuc_va_list __ap) __attribute__ ((__nothrow__ , __leaf__));
403extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
404__attribute__ ((__nothrow__ , __leaf__)) snprintf (char *__restrict __s, size_t __n, const char *__restrict __fmt, ...)
405{
406 return __builtin___snprintf_chk (__s, __n, 2 - 1,
407 __builtin_object_size (__s, 2 > 1), __fmt, __builtin_va_arg_pack ());
408}
409extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
410__attribute__ ((__nothrow__ , __leaf__)) vsnprintf (char *__restrict __s, size_t __n, const char *__restrict __fmt, __gnuc_va_list __ap)
411{
412 return __builtin___vsnprintf_chk (__s, __n, 2 - 1,
413 __builtin_object_size (__s, 2 > 1), __fmt, __ap);
414}
415extern int __fprintf_chk (FILE *__restrict __stream, int __flag,
416 const char *__restrict __format, ...);
417extern int __printf_chk (int __flag, const char *__restrict __format, ...);
418extern int __vfprintf_chk (FILE *__restrict __stream, int __flag,
419 const char *__restrict __format, __gnuc_va_list __ap);
420extern int __vprintf_chk (int __flag, const char *__restrict __format,
421 __gnuc_va_list __ap);
422extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
423fprintf (FILE *__restrict __stream, const char *__restrict __fmt, ...)
424{
425 return __fprintf_chk (__stream, 2 - 1, __fmt,
426 __builtin_va_arg_pack ());
427}
428extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
429printf (const char *__restrict __fmt, ...)
430{
431 return __printf_chk (2 - 1, __fmt, __builtin_va_arg_pack ());
432}
433extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
434vprintf (const char *__restrict __fmt, __gnuc_va_list __ap)
435{
436 return __vfprintf_chk (stdout, 2 - 1, __fmt, __ap);
437}
438extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
439vfprintf (FILE *__restrict __stream,
440 const char *__restrict __fmt, __gnuc_va_list __ap)
441{
442 return __vfprintf_chk (__stream, 2 - 1, __fmt, __ap);
443}
444extern int __dprintf_chk (int __fd, int __flag, const char *__restrict __fmt,
445 ...) __attribute__ ((__format__ (__printf__, 3, 4)));
446extern int __vdprintf_chk (int __fd, int __flag,
447 const char *__restrict __fmt, __gnuc_va_list __arg)
448 __attribute__ ((__format__ (__printf__, 3, 0)));
449extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
450dprintf (int __fd, const char *__restrict __fmt, ...)
451{
452 return __dprintf_chk (__fd, 2 - 1, __fmt,
453 __builtin_va_arg_pack ());
454}
455extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
456vdprintf (int __fd, const char *__restrict __fmt, __gnuc_va_list __ap)
457{
458 return __vdprintf_chk (__fd, 2 - 1, __fmt, __ap);
459}
460extern int __asprintf_chk (char **__restrict __ptr, int __flag,
461 const char *__restrict __fmt, ...)
462 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__format__ (__printf__, 3, 4))) __attribute__ ((__warn_unused_result__));
463extern int __vasprintf_chk (char **__restrict __ptr, int __flag,
464 const char *__restrict __fmt, __gnuc_va_list __arg)
465 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__format__ (__printf__, 3, 0))) __attribute__ ((__warn_unused_result__));
466extern int __obstack_printf_chk (struct obstack *__restrict __obstack,
467 int __flag, const char *__restrict __format,
468 ...)
469 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__format__ (__printf__, 3, 4)));
470extern int __obstack_vprintf_chk (struct obstack *__restrict __obstack,
471 int __flag,
472 const char *__restrict __format,
473 __gnuc_va_list __args)
474 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__format__ (__printf__, 3, 0)));
475extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
476__attribute__ ((__nothrow__ , __leaf__)) asprintf (char **__restrict __ptr, const char *__restrict __fmt, ...)
477{
478 return __asprintf_chk (__ptr, 2 - 1, __fmt,
479 __builtin_va_arg_pack ());
480}
481extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
482__attribute__ ((__nothrow__ , __leaf__)) __asprintf (char **__restrict __ptr, const char *__restrict __fmt, ...)
483{
484 return __asprintf_chk (__ptr, 2 - 1, __fmt,
485 __builtin_va_arg_pack ());
486}
487extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
488__attribute__ ((__nothrow__ , __leaf__)) obstack_printf (struct obstack *__restrict __obstack, const char *__restrict __fmt, ...)
489{
490 return __obstack_printf_chk (__obstack, 2 - 1, __fmt,
491 __builtin_va_arg_pack ());
492}
493extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
494__attribute__ ((__nothrow__ , __leaf__)) vasprintf (char **__restrict __ptr, const char *__restrict __fmt, __gnuc_va_list __ap)
495{
496 return __vasprintf_chk (__ptr, 2 - 1, __fmt, __ap);
497}
498extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
499__attribute__ ((__nothrow__ , __leaf__)) obstack_vprintf (struct obstack *__restrict __obstack, const char *__restrict __fmt, __gnuc_va_list __ap)
500{
501 return __obstack_vprintf_chk (__obstack, 2 - 1, __fmt,
502 __ap);
503}
504extern char *__fgets_chk (char *__restrict __s, size_t __size, int __n,
505 FILE *__restrict __stream)
506 __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 3)));
507extern char *__fgets_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets")
508 __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 2)));
509extern char *__fgets_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_chk")
510 __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets called with bigger size than length " "of destination buffer")));
511extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 2))) char *
512fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
513{
514 if (__builtin_object_size (__s, 2 > 1) != (size_t) -1)
515 {
516 if (!__builtin_constant_p (__n) || __n <= 0)
517 return __fgets_chk (__s, __builtin_object_size (__s, 2 > 1), __n, __stream);
518 if ((size_t) __n > __builtin_object_size (__s, 2 > 1))
519 return __fgets_chk_warn (__s, __builtin_object_size (__s, 2 > 1), __n, __stream);
520 }
521 return __fgets_alias (__s, __n, __stream);
522}
523extern size_t __fread_chk (void *__restrict __ptr, size_t __ptrlen,
524 size_t __size, size_t __n,
525 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
526extern size_t __fread_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread") __attribute__ ((__warn_unused_result__));
527extern size_t __fread_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_chk")
528 __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread called with bigger size * nmemb than length " "of destination buffer")));
529extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) size_t
530fread (void *__restrict __ptr, size_t __size, size_t __n,
531 FILE *__restrict __stream)
532{
533 if (__builtin_object_size (__ptr, 0) != (size_t) -1)
534 {
535 if (!__builtin_constant_p (__size)
536 || !__builtin_constant_p (__n)
537 || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2)))
538 return __fread_chk (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream);
539 if (__size * __n > __builtin_object_size (__ptr, 0))
540 return __fread_chk_warn (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream);
541 }
542 return __fread_alias (__ptr, __size, __n, __stream);
543}
544extern char *__fgets_unlocked_chk (char *__restrict __s, size_t __size,
545 int __n, FILE *__restrict __stream)
546 __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 3)));
547extern char *__fgets_unlocked_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets_unlocked")
548 __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 2)));
549extern char *__fgets_unlocked_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_unlocked_chk")
550 __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets_unlocked called with bigger size than length " "of destination buffer")));
551extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 2))) char *
552fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream)
553{
554 if (__builtin_object_size (__s, 2 > 1) != (size_t) -1)
555 {
556 if (!__builtin_constant_p (__n) || __n <= 0)
557 return __fgets_unlocked_chk (__s, __builtin_object_size (__s, 2 > 1), __n, __stream);
558 if ((size_t) __n > __builtin_object_size (__s, 2 > 1))
559 return __fgets_unlocked_chk_warn (__s, __builtin_object_size (__s, 2 > 1), __n, __stream);
560 }
561 return __fgets_unlocked_alias (__s, __n, __stream);
562}
563extern size_t __fread_unlocked_chk (void *__restrict __ptr, size_t __ptrlen,
564 size_t __size, size_t __n,
565 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
566extern size_t __fread_unlocked_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread_unlocked") __attribute__ ((__warn_unused_result__));
567extern size_t __fread_unlocked_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_unlocked_chk")
568 __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread_unlocked called with bigger size * nmemb than " "length of destination buffer")));
569extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) size_t
570fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n,
571 FILE *__restrict __stream)
572{
573 if (__builtin_object_size (__ptr, 0) != (size_t) -1)
574 {
575 if (!__builtin_constant_p (__size)
576 || !__builtin_constant_p (__n)
577 || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2)))
578 return __fread_unlocked_chk (__ptr, __builtin_object_size (__ptr, 0), __size, __n,
579 __stream);
580 if (__size * __n > __builtin_object_size (__ptr, 0))
581 return __fread_unlocked_chk_warn (__ptr, __builtin_object_size (__ptr, 0), __size, __n,
582 __stream);
583 }
584 if (__builtin_constant_p (__size)
585 && __builtin_constant_p (__n)
586 && (__size | __n) < (((size_t) 1) << (8 * sizeof (size_t) / 2))
587 && __size * __n <= 8)
588 {
589 size_t __cnt = __size * __n;
590 char *__cptr = (char *) __ptr;
591 if (__cnt == 0)
592 return 0;
593 for (; __cnt > 0; --__cnt)
594 {
595 int __c = getc_unlocked (__stream);
596 if (__c == (-1))
597 break;
598 *__cptr++ = __c;
599 }
600 return (__cptr - (char *) __ptr) / __size;
601 }
602 return __fread_unlocked_alias (__ptr, __size, __n, __stream);
603}
604
605
606typedef __u_char u_char;
607typedef __u_short u_short;
608typedef __u_int u_int;
609typedef __u_long u_long;
610typedef __quad_t quad_t;
611typedef __u_quad_t u_quad_t;
612typedef __fsid_t fsid_t;
613typedef __loff_t loff_t;
614typedef __ino_t ino_t;
615typedef __ino64_t ino64_t;
616typedef __dev_t dev_t;
617typedef __gid_t gid_t;
618typedef __mode_t mode_t;
619typedef __nlink_t nlink_t;
620typedef __uid_t uid_t;
621typedef __pid_t pid_t;
622typedef __id_t id_t;
623typedef __daddr_t daddr_t;
624typedef __caddr_t caddr_t;
625typedef __key_t key_t;
626typedef __clock_t clock_t;
627typedef __clockid_t clockid_t;
628typedef __time_t time_t;
629typedef __timer_t timer_t;
630typedef __useconds_t useconds_t;
631typedef __suseconds_t suseconds_t;
632typedef unsigned long int ulong;
633typedef unsigned short int ushort;
634typedef unsigned int uint;
635typedef __int8_t int8_t;
636typedef __int16_t int16_t;
637typedef __int32_t int32_t;
638typedef __int64_t int64_t;
639typedef __uint8_t u_int8_t;
640typedef __uint16_t u_int16_t;
641typedef __uint32_t u_int32_t;
642typedef __uint64_t u_int64_t;
643typedef int register_t __attribute__ ((__mode__ (__word__)));
644static __inline __uint16_t
645__bswap_16 (__uint16_t __bsx)
646{
647 return __builtin_bswap16 (__bsx);
648}
649static __inline __uint32_t
650__bswap_32 (__uint32_t __bsx)
651{
652 return __builtin_bswap32 (__bsx);
653}
654__extension__ static __inline __uint64_t
655__bswap_64 (__uint64_t __bsx)
656{
657 return __builtin_bswap64 (__bsx);
658}
659static __inline __uint16_t
660__uint16_identity (__uint16_t __x)
661{
662 return __x;
663}
664static __inline __uint32_t
665__uint32_identity (__uint32_t __x)
666{
667 return __x;
668}
669static __inline __uint64_t
670__uint64_identity (__uint64_t __x)
671{
672 return __x;
673}
674typedef struct
675{
676 unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];
677} __sigset_t;
678typedef __sigset_t sigset_t;
680{
681 __time_t tv_sec;
682 __suseconds_t tv_usec;
683};
685{
686 __time_t tv_sec;
687 __syscall_slong_t tv_nsec;
688};
689typedef long int __fd_mask;
690typedef struct
691 {
692 __fd_mask fds_bits[1024 / (8 * (int) sizeof (__fd_mask))];
693 } fd_set;
694typedef __fd_mask fd_mask;
695
696extern int select (int __nfds, fd_set *__restrict __readfds,
697 fd_set *__restrict __writefds,
698 fd_set *__restrict __exceptfds,
699 struct timeval *__restrict __timeout);
700extern int pselect (int __nfds, fd_set *__restrict __readfds,
701 fd_set *__restrict __writefds,
702 fd_set *__restrict __exceptfds,
703 const struct timespec *__restrict __timeout,
704 const __sigset_t *__restrict __sigmask);
705extern long int __fdelt_chk (long int __d);
706extern long int __fdelt_warn (long int __d)
707 __attribute__((__warning__ ("bit outside of fd_set selected")));
708
709typedef __blksize_t blksize_t;
710typedef __blkcnt_t blkcnt_t;
711typedef __fsblkcnt_t fsblkcnt_t;
712typedef __fsfilcnt_t fsfilcnt_t;
713typedef __blkcnt64_t blkcnt64_t;
714typedef __fsblkcnt64_t fsblkcnt64_t;
715typedef __fsfilcnt64_t fsfilcnt64_t;
717{
718 struct __pthread_internal_list *__prev;
719 struct __pthread_internal_list *__next;
722{
723 struct __pthread_internal_slist *__next;
726{
727 int __lock;
728 unsigned int __count;
729 int __owner;
730 unsigned int __nusers;
731 int __kind;
732 short __spins;
733 short __elision;
734 __pthread_list_t __list;
735};
737{
738 unsigned int __readers;
739 unsigned int __writers;
740 unsigned int __wrphase_futex;
741 unsigned int __writers_futex;
742 unsigned int __pad3;
743 unsigned int __pad4;
744 int __cur_writer;
745 int __shared;
746 signed char __rwelision;
747 unsigned char __pad1[7];
748 unsigned long int __pad2;
749 unsigned int __flags;
750};
752{
753 __extension__ union
754 {
755 __extension__ unsigned long long int __wseq;
756 struct
757 {
758 unsigned int __low;
759 unsigned int __high;
760 } __wseq32;
761 };
762 __extension__ union
763 {
764 __extension__ unsigned long long int __g1_start;
765 struct
766 {
767 unsigned int __low;
768 unsigned int __high;
769 } __g1_start32;
770 };
771 unsigned int __g_refs[2] ;
772 unsigned int __g_size[2];
773 unsigned int __g1_orig_size;
774 unsigned int __wrefs;
775 unsigned int __g_signals[2];
776};
777typedef unsigned int __tss_t;
778typedef unsigned long int __thrd_t;
779typedef struct
780{
781 int __data ;
783typedef unsigned long int pthread_t;
784typedef union
785{
786 char __size[4];
787 int __align;
789typedef union
790{
791 char __size[4];
792 int __align;
794typedef unsigned int pthread_key_t;
795typedef int pthread_once_t;
797{
798 char __size[56];
799 long int __align;
800};
801typedef union pthread_attr_t pthread_attr_t;
802typedef union
803{
804 struct __pthread_mutex_s __data;
805 char __size[40];
806 long int __align;
808typedef union
809{
810 struct __pthread_cond_s __data;
811 char __size[48];
812 __extension__ long long int __align;
814typedef union
815{
816 struct __pthread_rwlock_arch_t __data;
817 char __size[56];
818 long int __align;
820typedef union
821{
822 char __size[8];
823 long int __align;
825typedef volatile int pthread_spinlock_t;
826typedef union
827{
828 char __size[32];
829 long int __align;
831typedef union
832{
833 char __size[4];
834 int __align;
836
837
838struct stat
839 {
840 __dev_t st_dev;
841 __ino_t st_ino;
842 __nlink_t st_nlink;
843 __mode_t st_mode;
844 __uid_t st_uid;
845 __gid_t st_gid;
846 int __pad0;
847 __dev_t st_rdev;
848 __off_t st_size;
849 __blksize_t st_blksize;
850 __blkcnt_t st_blocks;
851 struct timespec st_atim;
852 struct timespec st_mtim;
853 struct timespec st_ctim;
854 __syscall_slong_t __glibc_reserved[3];
855 };
856struct stat64
857 {
858 __dev_t st_dev;
859 __ino64_t st_ino;
860 __nlink_t st_nlink;
861 __mode_t st_mode;
862 __uid_t st_uid;
863 __gid_t st_gid;
864 int __pad0;
865 __dev_t st_rdev;
866 __off_t st_size;
867 __blksize_t st_blksize;
868 __blkcnt64_t st_blocks;
869 struct timespec st_atim;
870 struct timespec st_mtim;
871 struct timespec st_ctim;
872 __syscall_slong_t __glibc_reserved[3];
873 };
874extern int stat (const char *__restrict __file,
875 struct stat *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
876extern int fstat (int __fd, struct stat *__buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
877extern int stat64 (const char *__restrict __file,
878 struct stat64 *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
879extern int fstat64 (int __fd, struct stat64 *__buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
880extern int fstatat (int __fd, const char *__restrict __file,
881 struct stat *__restrict __buf, int __flag)
882 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3)));
883extern int fstatat64 (int __fd, const char *__restrict __file,
884 struct stat64 *__restrict __buf, int __flag)
885 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3)));
886extern int lstat (const char *__restrict __file,
887 struct stat *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
888extern int lstat64 (const char *__restrict __file,
889 struct stat64 *__restrict __buf)
890 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
891extern int chmod (const char *__file, __mode_t __mode)
892 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
893extern int lchmod (const char *__file, __mode_t __mode)
894 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
895extern int fchmod (int __fd, __mode_t __mode) __attribute__ ((__nothrow__ , __leaf__));
896extern int fchmodat (int __fd, const char *__file, __mode_t __mode,
897 int __flag)
898 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__));
899extern __mode_t umask (__mode_t __mask) __attribute__ ((__nothrow__ , __leaf__));
900extern __mode_t getumask (void) __attribute__ ((__nothrow__ , __leaf__));
901extern int mkdir (const char *__path, __mode_t __mode)
902 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
903extern int mkdirat (int __fd, const char *__path, __mode_t __mode)
904 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
905extern int mknod (const char *__path, __mode_t __mode, __dev_t __dev)
906 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
907extern int mknodat (int __fd, const char *__path, __mode_t __mode,
908 __dev_t __dev) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
909extern int mkfifo (const char *__path, __mode_t __mode)
910 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
911extern int mkfifoat (int __fd, const char *__path, __mode_t __mode)
912 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
913extern int utimensat (int __fd, const char *__path,
914 const struct timespec __times[2],
915 int __flags)
916 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
917extern int futimens (int __fd, const struct timespec __times[2]) __attribute__ ((__nothrow__ , __leaf__));
918extern int __fxstat (int __ver, int __fildes, struct stat *__stat_buf)
919 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
920extern int __xstat (int __ver, const char *__filename,
921 struct stat *__stat_buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3)));
922extern int __lxstat (int __ver, const char *__filename,
923 struct stat *__stat_buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3)));
924extern int __fxstatat (int __ver, int __fildes, const char *__filename,
925 struct stat *__stat_buf, int __flag)
926 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4)));
927extern int __fxstat64 (int __ver, int __fildes, struct stat64 *__stat_buf)
928 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
929extern int __xstat64 (int __ver, const char *__filename,
930 struct stat64 *__stat_buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3)));
931extern int __lxstat64 (int __ver, const char *__filename,
932 struct stat64 *__stat_buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3)));
933extern int __fxstatat64 (int __ver, int __fildes, const char *__filename,
934 struct stat64 *__stat_buf, int __flag)
935 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4)));
936extern int __xmknod (int __ver, const char *__path, __mode_t __mode,
937 __dev_t *__dev) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4)));
938extern int __xmknodat (int __ver, int __fd, const char *__path,
939 __mode_t __mode, __dev_t *__dev)
940 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 5)));
941typedef __signed__ char __s8;
942typedef unsigned char __u8;
943typedef __signed__ short __s16;
944typedef unsigned short __u16;
945typedef __signed__ int __s32;
946typedef unsigned int __u32;
947__extension__ typedef __signed__ long long __s64;
948__extension__ typedef unsigned long long __u64;
949typedef struct {
950 unsigned long fds_bits[1024 / (8 * sizeof(long))];
952typedef void (*__kernel_sighandler_t)(int);
953typedef int __kernel_key_t;
954typedef int __kernel_mqd_t;
955typedef unsigned short __kernel_old_uid_t;
956typedef unsigned short __kernel_old_gid_t;
957typedef unsigned long __kernel_old_dev_t;
958typedef long __kernel_long_t;
959typedef unsigned long __kernel_ulong_t;
960typedef __kernel_ulong_t __kernel_ino_t;
961typedef unsigned int __kernel_mode_t;
962typedef int __kernel_pid_t;
963typedef int __kernel_ipc_pid_t;
964typedef unsigned int __kernel_uid_t;
965typedef unsigned int __kernel_gid_t;
966typedef __kernel_long_t __kernel_suseconds_t;
967typedef int __kernel_daddr_t;
968typedef unsigned int __kernel_uid32_t;
969typedef unsigned int __kernel_gid32_t;
970typedef __kernel_ulong_t __kernel_size_t;
971typedef __kernel_long_t __kernel_ssize_t;
972typedef __kernel_long_t __kernel_ptrdiff_t;
973typedef struct {
974 int val[2];
976typedef __kernel_long_t __kernel_off_t;
977typedef long long __kernel_loff_t;
978typedef __kernel_long_t __kernel_old_time_t;
979typedef __kernel_long_t __kernel_time_t;
980typedef long long __kernel_time64_t;
981typedef __kernel_long_t __kernel_clock_t;
982typedef int __kernel_timer_t;
983typedef int __kernel_clockid_t;
984typedef char * __kernel_caddr_t;
985typedef unsigned short __kernel_uid16_t;
986typedef unsigned short __kernel_gid16_t;
987typedef __u16 __le16;
988typedef __u16 __be16;
989typedef __u32 __le32;
990typedef __u32 __be32;
991typedef __u64 __le64;
992typedef __u64 __be64;
993typedef __u16 __sum16;
994typedef __u32 __wsum;
995typedef unsigned __poll_t;
997 __s64 tv_sec;
998 __u32 tv_nsec;
999 __s32 __reserved;
1000};
1001struct statx {
1002 __u32 stx_mask;
1003 __u32 stx_blksize;
1004 __u64 stx_attributes;
1005 __u32 stx_nlink;
1006 __u32 stx_uid;
1007 __u32 stx_gid;
1008 __u16 stx_mode;
1009 __u16 __spare0[1];
1010 __u64 stx_ino;
1011 __u64 stx_size;
1012 __u64 stx_blocks;
1013 __u64 stx_attributes_mask;
1014 struct statx_timestamp stx_atime;
1015 struct statx_timestamp stx_btime;
1016 struct statx_timestamp stx_ctime;
1017 struct statx_timestamp stx_mtime;
1018 __u32 stx_rdev_major;
1019 __u32 stx_rdev_minor;
1020 __u32 stx_dev_major;
1021 __u32 stx_dev_minor;
1022 __u64 stx_mnt_id;
1023 __u64 __spare2;
1024 __u64 __spare3[12];
1025};
1026
1027int statx (int __dirfd, const char *__restrict __path, int __flags,
1028 unsigned int __mask, struct statx *__restrict __buf)
1029 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 5)));
1030
1031extern __inline __attribute__ ((__gnu_inline__)) int
1032__attribute__ ((__nothrow__ , __leaf__)) stat (const char *__path, struct stat *__statbuf)
1033{
1034 return __xstat (1, __path, __statbuf);
1035}
1036extern __inline __attribute__ ((__gnu_inline__)) int
1037__attribute__ ((__nothrow__ , __leaf__)) lstat (const char *__path, struct stat *__statbuf)
1038{
1039 return __lxstat (1, __path, __statbuf);
1040}
1041extern __inline __attribute__ ((__gnu_inline__)) int
1042__attribute__ ((__nothrow__ , __leaf__)) fstat (int __fd, struct stat *__statbuf)
1043{
1044 return __fxstat (1, __fd, __statbuf);
1045}
1046extern __inline __attribute__ ((__gnu_inline__)) int
1047__attribute__ ((__nothrow__ , __leaf__)) fstatat (int __fd, const char *__filename, struct stat *__statbuf, int __flag)
1048{
1049 return __fxstatat (1, __fd, __filename, __statbuf, __flag);
1050}
1051extern __inline __attribute__ ((__gnu_inline__)) int
1052__attribute__ ((__nothrow__ , __leaf__)) mknod (const char *__path, __mode_t __mode, __dev_t __dev)
1053{
1054 return __xmknod (0, __path, __mode, &__dev);
1055}
1056extern __inline __attribute__ ((__gnu_inline__)) int
1057__attribute__ ((__nothrow__ , __leaf__)) mknodat (int __fd, const char *__path, __mode_t __mode, __dev_t __dev)
1058{
1059 return __xmknodat (0, __fd, __path, __mode, &__dev);
1060}
1061extern __inline __attribute__ ((__gnu_inline__)) int
1062__attribute__ ((__nothrow__ , __leaf__)) stat64 (const char *__path, struct stat64 *__statbuf)
1063{
1064 return __xstat64 (1, __path, __statbuf);
1065}
1066extern __inline __attribute__ ((__gnu_inline__)) int
1067__attribute__ ((__nothrow__ , __leaf__)) lstat64 (const char *__path, struct stat64 *__statbuf)
1068{
1069 return __lxstat64 (1, __path, __statbuf);
1070}
1071extern __inline __attribute__ ((__gnu_inline__)) int
1072__attribute__ ((__nothrow__ , __leaf__)) fstat64 (int __fd, struct stat64 *__statbuf)
1073{
1074 return __fxstat64 (1, __fd, __statbuf);
1075}
1076extern __inline __attribute__ ((__gnu_inline__)) int
1077__attribute__ ((__nothrow__ , __leaf__)) fstatat64 (int __fd, const char *__filename, struct stat64 *__statbuf, int __flag)
1078{
1079 return __fxstatat64 (1, __fd, __filename, __statbuf, __flag);
1080}
1081
1082typedef int wchar_t;
1083
1084typedef struct
1085 {
1086 int quot;
1087 int rem;
1088 } div_t;
1089typedef struct
1090 {
1091 long int quot;
1092 long int rem;
1093 } ldiv_t;
1094__extension__ typedef struct
1095 {
1096 long long int quot;
1097 long long int rem;
1098 } lldiv_t;
1099extern size_t __ctype_get_mb_cur_max (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1100extern double atof (const char *__nptr)
1101 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1102extern int atoi (const char *__nptr)
1103 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1104extern long int atol (const char *__nptr)
1105 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1106__extension__ extern long long int atoll (const char *__nptr)
1107 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1108extern double strtod (const char *__restrict __nptr,
1109 char **__restrict __endptr)
1110 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1111extern float strtof (const char *__restrict __nptr,
1112 char **__restrict __endptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1113extern long double strtold (const char *__restrict __nptr,
1114 char **__restrict __endptr)
1115 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1116extern _Float32 strtof32 (const char *__restrict __nptr,
1117 char **__restrict __endptr)
1118 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1119extern _Float64 strtof64 (const char *__restrict __nptr,
1120 char **__restrict __endptr)
1121 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1122extern _Float128 strtof128 (const char *__restrict __nptr,
1123 char **__restrict __endptr)
1124 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1125extern _Float32x strtof32x (const char *__restrict __nptr,
1126 char **__restrict __endptr)
1127 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1128extern _Float64x strtof64x (const char *__restrict __nptr,
1129 char **__restrict __endptr)
1130 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1131extern long int strtol (const char *__restrict __nptr,
1132 char **__restrict __endptr, int __base)
1133 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1134extern unsigned long int strtoul (const char *__restrict __nptr,
1135 char **__restrict __endptr, int __base)
1136 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1137__extension__
1138extern long long int strtoq (const char *__restrict __nptr,
1139 char **__restrict __endptr, int __base)
1140 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1141__extension__
1142extern unsigned long long int strtouq (const char *__restrict __nptr,
1143 char **__restrict __endptr, int __base)
1144 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1145__extension__
1146extern long long int strtoll (const char *__restrict __nptr,
1147 char **__restrict __endptr, int __base)
1148 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1149__extension__
1150extern unsigned long long int strtoull (const char *__restrict __nptr,
1151 char **__restrict __endptr, int __base)
1152 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1153extern int strfromd (char *__dest, size_t __size, const char *__format,
1154 double __f)
1155 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
1156extern int strfromf (char *__dest, size_t __size, const char *__format,
1157 float __f)
1158 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
1159extern int strfroml (char *__dest, size_t __size, const char *__format,
1160 long double __f)
1161 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
1162extern int strfromf32 (char *__dest, size_t __size, const char * __format,
1163 _Float32 __f)
1164 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
1165extern int strfromf64 (char *__dest, size_t __size, const char * __format,
1166 _Float64 __f)
1167 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
1168extern int strfromf128 (char *__dest, size_t __size, const char * __format,
1169 _Float128 __f)
1170 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
1171extern int strfromf32x (char *__dest, size_t __size, const char * __format,
1172 _Float32x __f)
1173 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
1174extern int strfromf64x (char *__dest, size_t __size, const char * __format,
1175 _Float64x __f)
1176 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
1178{
1179 struct __locale_data *__locales[13];
1180 const unsigned short int *__ctype_b;
1181 const int *__ctype_tolower;
1182 const int *__ctype_toupper;
1183 const char *__names[13];
1184};
1185typedef struct __locale_struct *__locale_t;
1186typedef __locale_t locale_t;
1187extern long int strtol_l (const char *__restrict __nptr,
1188 char **__restrict __endptr, int __base,
1189 locale_t __loc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 4)));
1190extern unsigned long int strtoul_l (const char *__restrict __nptr,
1191 char **__restrict __endptr,
1192 int __base, locale_t __loc)
1193 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 4)));
1194__extension__
1195extern long long int strtoll_l (const char *__restrict __nptr,
1196 char **__restrict __endptr, int __base,
1197 locale_t __loc)
1198 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 4)));
1199__extension__
1200extern unsigned long long int strtoull_l (const char *__restrict __nptr,
1201 char **__restrict __endptr,
1202 int __base, locale_t __loc)
1203 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 4)));
1204extern double strtod_l (const char *__restrict __nptr,
1205 char **__restrict __endptr, locale_t __loc)
1206 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3)));
1207extern float strtof_l (const char *__restrict __nptr,
1208 char **__restrict __endptr, locale_t __loc)
1209 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3)));
1210extern long double strtold_l (const char *__restrict __nptr,
1211 char **__restrict __endptr,
1212 locale_t __loc)
1213 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3)));
1214extern _Float32 strtof32_l (const char *__restrict __nptr,
1215 char **__restrict __endptr,
1216 locale_t __loc)
1217 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3)));
1218extern _Float64 strtof64_l (const char *__restrict __nptr,
1219 char **__restrict __endptr,
1220 locale_t __loc)
1221 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3)));
1222extern _Float128 strtof128_l (const char *__restrict __nptr,
1223 char **__restrict __endptr,
1224 locale_t __loc)
1225 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3)));
1226extern _Float32x strtof32x_l (const char *__restrict __nptr,
1227 char **__restrict __endptr,
1228 locale_t __loc)
1229 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3)));
1230extern _Float64x strtof64x_l (const char *__restrict __nptr,
1231 char **__restrict __endptr,
1232 locale_t __loc)
1233 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3)));
1234extern __inline __attribute__ ((__gnu_inline__)) int
1235__attribute__ ((__nothrow__ , __leaf__)) atoi (const char *__nptr)
1236{
1237 return (int) strtol (__nptr, (char **) ((void *)0), 10);
1238}
1239extern __inline __attribute__ ((__gnu_inline__)) long int
1240__attribute__ ((__nothrow__ , __leaf__)) atol (const char *__nptr)
1241{
1242 return strtol (__nptr, (char **) ((void *)0), 10);
1243}
1244__extension__ extern __inline __attribute__ ((__gnu_inline__)) long long int
1245__attribute__ ((__nothrow__ , __leaf__)) atoll (const char *__nptr)
1246{
1247 return strtoll (__nptr, (char **) ((void *)0), 10);
1248}
1249extern char *l64a (long int __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1250extern long int a64l (const char *__s)
1251 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1252extern long int random (void) __attribute__ ((__nothrow__ , __leaf__));
1253extern void srandom (unsigned int __seed) __attribute__ ((__nothrow__ , __leaf__));
1254extern char *initstate (unsigned int __seed, char *__statebuf,
1255 size_t __statelen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
1256extern char *setstate (char *__statebuf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1258 {
1259 int32_t *fptr;
1260 int32_t *rptr;
1261 int32_t *state;
1262 int rand_type;
1263 int rand_deg;
1264 int rand_sep;
1265 int32_t *end_ptr;
1266 };
1267extern int random_r (struct random_data *__restrict __buf,
1268 int32_t *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1269extern int srandom_r (unsigned int __seed, struct random_data *__buf)
1270 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
1271extern int initstate_r (unsigned int __seed, char *__restrict __statebuf,
1272 size_t __statelen,
1273 struct random_data *__restrict __buf)
1274 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4)));
1275extern int setstate_r (char *__restrict __statebuf,
1276 struct random_data *__restrict __buf)
1277 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1278extern int rand (void) __attribute__ ((__nothrow__ , __leaf__));
1279extern void srand (unsigned int __seed) __attribute__ ((__nothrow__ , __leaf__));
1280extern int rand_r (unsigned int *__seed) __attribute__ ((__nothrow__ , __leaf__));
1281extern double drand48 (void) __attribute__ ((__nothrow__ , __leaf__));
1282extern double erand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1283extern long int lrand48 (void) __attribute__ ((__nothrow__ , __leaf__));
1284extern long int nrand48 (unsigned short int __xsubi[3])
1285 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1286extern long int mrand48 (void) __attribute__ ((__nothrow__ , __leaf__));
1287extern long int jrand48 (unsigned short int __xsubi[3])
1288 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1289extern void srand48 (long int __seedval) __attribute__ ((__nothrow__ , __leaf__));
1290extern unsigned short int *seed48 (unsigned short int __seed16v[3])
1291 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1292extern void lcong48 (unsigned short int __param[7]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1294 {
1295 unsigned short int __x[3];
1296 unsigned short int __old_x[3];
1297 unsigned short int __c;
1298 unsigned short int __init;
1299 __extension__ unsigned long long int __a;
1300 };
1301extern int drand48_r (struct drand48_data *__restrict __buffer,
1302 double *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1303extern int erand48_r (unsigned short int __xsubi[3],
1304 struct drand48_data *__restrict __buffer,
1305 double *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1306extern int lrand48_r (struct drand48_data *__restrict __buffer,
1307 long int *__restrict __result)
1308 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1309extern int nrand48_r (unsigned short int __xsubi[3],
1310 struct drand48_data *__restrict __buffer,
1311 long int *__restrict __result)
1312 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1313extern int mrand48_r (struct drand48_data *__restrict __buffer,
1314 long int *__restrict __result)
1315 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1316extern int jrand48_r (unsigned short int __xsubi[3],
1317 struct drand48_data *__restrict __buffer,
1318 long int *__restrict __result)
1319 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1320extern int srand48_r (long int __seedval, struct drand48_data *__buffer)
1321 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
1322extern int seed48_r (unsigned short int __seed16v[3],
1323 struct drand48_data *__buffer) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1324extern int lcong48_r (unsigned short int __param[7],
1325 struct drand48_data *__buffer)
1326 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1327extern void *malloc (size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__))
1328 __attribute__ ((__alloc_size__ (1))) __attribute__ ((__warn_unused_result__));
1329extern void *calloc (size_t __nmemb, size_t __size)
1330 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__alloc_size__ (1, 2))) __attribute__ ((__warn_unused_result__));
1331extern void *realloc (void *__ptr, size_t __size)
1332 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)) __attribute__ ((__alloc_size__ (2)));
1333extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size)
1334 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__))
1335 __attribute__ ((__alloc_size__ (2, 3)));
1336extern void free (void *__ptr) __attribute__ ((__nothrow__ , __leaf__));
1337
1338extern void *alloca (size_t __size) __attribute__ ((__nothrow__ , __leaf__));
1339
1340extern void *valloc (size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__))
1341 __attribute__ ((__alloc_size__ (1))) __attribute__ ((__warn_unused_result__));
1342extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size)
1343 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1344extern void *aligned_alloc (size_t __alignment, size_t __size)
1345 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__alloc_size__ (2))) __attribute__ ((__warn_unused_result__));
1346extern void abort (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
1347extern int atexit (void (*__func) (void)) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1348extern int at_quick_exit (void (*__func) (void)) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1349extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg)
1350 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1351extern void exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
1352extern void quick_exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
1353extern void _Exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
1354extern char *getenv (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1355extern char *secure_getenv (const char *__name)
1356 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1357extern int putenv (char *__string) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1358extern int setenv (const char *__name, const char *__value, int __replace)
1359 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
1360extern int unsetenv (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1361extern int clearenv (void) __attribute__ ((__nothrow__ , __leaf__));
1362extern char *mktemp (char *__template) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1363extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1364extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1365extern int mkstemps (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1366extern int mkstemps64 (char *__template, int __suffixlen)
1367 __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1368extern char *mkdtemp (char *__template) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1369extern int mkostemp (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1370extern int mkostemp64 (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1371extern int mkostemps (char *__template, int __suffixlen, int __flags)
1372 __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1373extern int mkostemps64 (char *__template, int __suffixlen, int __flags)
1374 __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1375extern int system (const char *__command) __attribute__ ((__warn_unused_result__));
1376extern char *canonicalize_file_name (const char *__name)
1377 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1378extern char *realpath (const char *__restrict __name,
1379 char *__restrict __resolved) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1380typedef int (*__compar_fn_t) (const void *, const void *);
1381typedef __compar_fn_t comparison_fn_t;
1382typedef int (*__compar_d_fn_t) (const void *, const void *, void *);
1383extern void *bsearch (const void *__key, const void *__base,
1384 size_t __nmemb, size_t __size, __compar_fn_t __compar)
1385 __attribute__ ((__nonnull__ (1, 2, 5))) __attribute__ ((__warn_unused_result__));
1386extern __inline __attribute__ ((__gnu_inline__)) void *
1387bsearch (const void *__key, const void *__base, size_t __nmemb, size_t __size,
1388 __compar_fn_t __compar)
1389{
1390 size_t __l, __u, __idx;
1391 const void *__p;
1392 int __comparison;
1393 __l = 0;
1394 __u = __nmemb;
1395 while (__l < __u)
1396 {
1397 __idx = (__l + __u) / 2;
1398 __p = (void *) (((const char *) __base) + (__idx * __size));
1399 __comparison = (*__compar) (__key, __p);
1400 if (__comparison < 0)
1401 __u = __idx;
1402 else if (__comparison > 0)
1403 __l = __idx + 1;
1404 else
1405 return (void *) __p;
1406 }
1407 return ((void *)0);
1408}
1409extern void qsort (void *__base, size_t __nmemb, size_t __size,
1410 __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4)));
1411extern void qsort_r (void *__base, size_t __nmemb, size_t __size,
1412 __compar_d_fn_t __compar, void *__arg)
1413 __attribute__ ((__nonnull__ (1, 4)));
1414extern int abs (int __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
1415extern long int labs (long int __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
1416__extension__ extern long long int llabs (long long int __x)
1417 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
1418extern div_t div (int __numer, int __denom)
1419 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
1420extern ldiv_t ldiv (long int __numer, long int __denom)
1421 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
1422__extension__ extern lldiv_t lldiv (long long int __numer,
1423 long long int __denom)
1424 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
1425extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt,
1426 int *__restrict __sign) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__));
1427extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt,
1428 int *__restrict __sign) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__));
1429extern char *gcvt (double __value, int __ndigit, char *__buf)
1430 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__));
1431extern char *qecvt (long double __value, int __ndigit,
1432 int *__restrict __decpt, int *__restrict __sign)
1433 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__));
1434extern char *qfcvt (long double __value, int __ndigit,
1435 int *__restrict __decpt, int *__restrict __sign)
1436 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__));
1437extern char *qgcvt (long double __value, int __ndigit, char *__buf)
1438 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__));
1439extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt,
1440 int *__restrict __sign, char *__restrict __buf,
1441 size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5)));
1442extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
1443 int *__restrict __sign, char *__restrict __buf,
1444 size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5)));
1445extern int qecvt_r (long double __value, int __ndigit,
1446 int *__restrict __decpt, int *__restrict __sign,
1447 char *__restrict __buf, size_t __len)
1448 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5)));
1449extern int qfcvt_r (long double __value, int __ndigit,
1450 int *__restrict __decpt, int *__restrict __sign,
1451 char *__restrict __buf, size_t __len)
1452 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5)));
1453extern int mblen (const char *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__));
1454extern int mbtowc (wchar_t *__restrict __pwc,
1455 const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__ , __leaf__));
1456extern int wctomb (char *__s, wchar_t __wchar) __attribute__ ((__nothrow__ , __leaf__));
1457extern size_t mbstowcs (wchar_t *__restrict __pwcs,
1458 const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__ , __leaf__))
1459 __attribute__ ((__access__ (__read_only__, 2)));
1460extern size_t wcstombs (char *__restrict __s,
1461 const wchar_t *__restrict __pwcs, size_t __n)
1462 __attribute__ ((__nothrow__ , __leaf__))
1463 __attribute__ ((__access__ (__write_only__, 1, 3))) __attribute__ ((__access__ (__read_only__, 2)));
1464extern int rpmatch (const char *__response) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1465extern int getsubopt (char **__restrict __optionp,
1466 char *const *__restrict __tokens,
1467 char **__restrict __valuep)
1468 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2, 3))) __attribute__ ((__warn_unused_result__));
1469extern int posix_openpt (int __oflag) __attribute__ ((__warn_unused_result__));
1470extern int grantpt (int __fd) __attribute__ ((__nothrow__ , __leaf__));
1471extern int unlockpt (int __fd) __attribute__ ((__nothrow__ , __leaf__));
1472extern char *ptsname (int __fd) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1473extern int ptsname_r (int __fd, char *__buf, size_t __buflen)
1474 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__access__ (__write_only__, 2, 3)));
1475extern int getpt (void);
1476extern int getloadavg (double __loadavg[], int __nelem)
1477 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1478extern __inline __attribute__ ((__gnu_inline__)) double
1479__attribute__ ((__nothrow__ , __leaf__)) atof (const char *__nptr)
1480{
1481 return strtod (__nptr, (char **) ((void *)0));
1482}
1483extern char *__realpath_chk (const char *__restrict __name,
1484 char *__restrict __resolved,
1485 size_t __resolvedlen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1486extern char *__realpath_alias (const char *__restrict __name, char *__restrict __resolved) __asm__ ("" "realpath") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1487extern char *__realpath_chk_warn (const char *__restrict __name, char *__restrict __resolved, size_t __resolvedlen) __asm__ ("" "__realpath_chk") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__))
1488 __attribute__((__warning__ ("second argument of realpath must be either NULL or at " "least PATH_MAX bytes long buffer")));
1489extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char *
1490__attribute__ ((__nothrow__ , __leaf__)) realpath (const char *__restrict __name, char *__restrict __resolved)
1491{
1492 if (__builtin_object_size (__resolved, 2 > 1) != (size_t) -1)
1493 {
1494 return __realpath_chk (__name, __resolved, __builtin_object_size (__resolved, 2 > 1));
1495 }
1496 return __realpath_alias (__name, __resolved);
1497}
1498extern int __ptsname_r_chk (int __fd, char *__buf, size_t __buflen,
1499 size_t __nreal) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)))
1500 __attribute__ ((__access__ (__write_only__, 2, 3)));
1501extern int __ptsname_r_alias (int __fd, char *__buf, size_t __buflen) __asm__ ("" "ptsname_r") __attribute__ ((__nothrow__ , __leaf__))
1502 __attribute__ ((__nonnull__ (2))) __attribute__ ((__access__ (__write_only__, 2, 3)));
1503extern int __ptsname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__ptsname_r_chk") __attribute__ ((__nothrow__ , __leaf__))
1504 __attribute__ ((__nonnull__ (2))) __attribute__((__warning__ ("ptsname_r called with buflen bigger than " "size of buf")));
1505extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
1506__attribute__ ((__nothrow__ , __leaf__)) ptsname_r (int __fd, char *__buf, size_t __buflen)
1507{
1508 if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
1509 {
1510 if (!__builtin_constant_p (__buflen))
1511 return __ptsname_r_chk (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1));
1512 if (__buflen > __builtin_object_size (__buf, 2 > 1))
1513 return __ptsname_r_chk_warn (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1));
1514 }
1515 return __ptsname_r_alias (__fd, __buf, __buflen);
1516}
1517extern int __wctomb_chk (char *__s, wchar_t __wchar, size_t __buflen)
1518 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1519extern int __wctomb_alias (char *__s, wchar_t __wchar) __asm__ ("" "wctomb") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1520extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) int
1521__attribute__ ((__nothrow__ , __leaf__)) wctomb (char *__s, wchar_t __wchar)
1522{
1523 if (__builtin_object_size (__s, 2 > 1) != (size_t) -1 && 16 > __builtin_object_size (__s, 2 > 1))
1524 return __wctomb_chk (__s, __wchar, __builtin_object_size (__s, 2 > 1));
1525 return __wctomb_alias (__s, __wchar);
1526}
1527extern size_t __mbstowcs_chk (wchar_t *__restrict __dst,
1528 const char *__restrict __src,
1529 size_t __len, size_t __dstlen) __attribute__ ((__nothrow__ , __leaf__))
1530 __attribute__ ((__access__ (__write_only__, 1, 3))) __attribute__ ((__access__ (__read_only__, 2)));
1531extern size_t __mbstowcs_alias (wchar_t *__restrict __dst, const char *__restrict __src, size_t __len) __asm__ ("" "mbstowcs") __attribute__ ((__nothrow__ , __leaf__))
1532 __attribute__ ((__access__ (__write_only__, 1, 3))) __attribute__ ((__access__ (__read_only__, 2)));
1533extern size_t __mbstowcs_chk_warn (wchar_t *__restrict __dst, const char *__restrict __src, size_t __len, size_t __dstlen) __asm__ ("" "__mbstowcs_chk") __attribute__ ((__nothrow__ , __leaf__))
1534 __attribute__((__warning__ ("mbstowcs called with dst buffer smaller than len " "* sizeof (wchar_t)")));
1535extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) size_t
1536__attribute__ ((__nothrow__ , __leaf__)) mbstowcs (wchar_t *__restrict __dst, const char *__restrict __src, size_t __len)
1537{
1538 if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1)
1539 {
1540 if (!__builtin_constant_p (__len))
1541 return __mbstowcs_chk (__dst, __src, __len,
1542 __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t));
1543 if (__len > __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t))
1544 return __mbstowcs_chk_warn (__dst, __src, __len,
1545 __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t));
1546 }
1547 return __mbstowcs_alias (__dst, __src, __len);
1548}
1549extern size_t __wcstombs_chk (char *__restrict __dst,
1550 const wchar_t *__restrict __src,
1551 size_t __len, size_t __dstlen) __attribute__ ((__nothrow__ , __leaf__))
1552 __attribute__ ((__access__ (__write_only__, 1, 3))) __attribute__ ((__access__ (__read_only__, 2)));
1553extern size_t __wcstombs_alias (char *__restrict __dst, const wchar_t *__restrict __src, size_t __len) __asm__ ("" "wcstombs") __attribute__ ((__nothrow__ , __leaf__))
1554 __attribute__ ((__access__ (__write_only__, 1, 3))) __attribute__ ((__access__ (__read_only__, 2)));
1555extern size_t __wcstombs_chk_warn (char *__restrict __dst, const wchar_t *__restrict __src, size_t __len, size_t __dstlen) __asm__ ("" "__wcstombs_chk") __attribute__ ((__nothrow__ , __leaf__))
1556 __attribute__((__warning__ ("wcstombs called with dst buffer smaller than len")));
1557extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) size_t
1558__attribute__ ((__nothrow__ , __leaf__)) wcstombs (char *__restrict __dst, const wchar_t *__restrict __src, size_t __len)
1559{
1560 if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1)
1561 {
1562 if (!__builtin_constant_p (__len))
1563 return __wcstombs_chk (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1));
1564 if (__len > __builtin_object_size (__dst, 2 > 1))
1565 return __wcstombs_chk_warn (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1));
1566 }
1567 return __wcstombs_alias (__dst, __src, __len);
1568}
1569
1570typedef long int ptrdiff_t;
1571
1572extern void *memcpy (void *__restrict __dest, const void *__restrict __src,
1573 size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1574extern void *memmove (void *__dest, const void *__src, size_t __n)
1575 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1576extern void *memccpy (void *__restrict __dest, const void *__restrict __src,
1577 int __c, size_t __n)
1578 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__access__ (__write_only__, 1, 4)));
1579extern void *memset (void *__s, int __c, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1580extern int memcmp (const void *__s1, const void *__s2, size_t __n)
1581 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1582extern void *memchr (const void *__s, int __c, size_t __n)
1583 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1584extern void *rawmemchr (const void *__s, int __c)
1585 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1586extern void *memrchr (const void *__s, int __c, size_t __n)
1587 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)))
1588 __attribute__ ((__access__ (__read_only__, 1, 3)));
1589extern char *strcpy (char *__restrict __dest, const char *__restrict __src)
1590 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1591extern char *strncpy (char *__restrict __dest,
1592 const char *__restrict __src, size_t __n)
1593 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1594extern char *strcat (char *__restrict __dest, const char *__restrict __src)
1595 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1596extern char *strncat (char *__restrict __dest, const char *__restrict __src,
1597 size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1598extern int strcmp (const char *__s1, const char *__s2)
1599 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1600extern int strncmp (const char *__s1, const char *__s2, size_t __n)
1601 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1602extern int strcoll (const char *__s1, const char *__s2)
1603 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1604extern size_t strxfrm (char *__restrict __dest,
1605 const char *__restrict __src, size_t __n)
1606 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__access__ (__write_only__, 1, 3)));
1607extern int strcoll_l (const char *__s1, const char *__s2, locale_t __l)
1608 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3)));
1609extern size_t strxfrm_l (char *__dest, const char *__src, size_t __n,
1610 locale_t __l) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4)))
1611 __attribute__ ((__access__ (__write_only__, 1, 3)));
1612extern char *strdup (const char *__s)
1613 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
1614extern char *strndup (const char *__string, size_t __n)
1615 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
1616extern char *strchr (const char *__s, int __c)
1617 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1618extern char *strrchr (const char *__s, int __c)
1619 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1620extern char *strchrnul (const char *__s, int __c)
1621 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1622extern size_t strcspn (const char *__s, const char *__reject)
1623 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1624extern size_t strspn (const char *__s, const char *__accept)
1625 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1626extern char *strpbrk (const char *__s, const char *__accept)
1627 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1628extern char *strstr (const char *__haystack, const char *__needle)
1629 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1630extern char *strtok (char *__restrict __s, const char *__restrict __delim)
1631 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
1632extern char *__strtok_r (char *__restrict __s,
1633 const char *__restrict __delim,
1634 char **__restrict __save_ptr)
1635 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3)));
1636extern char *strtok_r (char *__restrict __s, const char *__restrict __delim,
1637 char **__restrict __save_ptr)
1638 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3)));
1639extern char *strcasestr (const char *__haystack, const char *__needle)
1640 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1641extern void *memmem (const void *__haystack, size_t __haystacklen,
1642 const void *__needle, size_t __needlelen)
1643 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3)))
1644 __attribute__ ((__access__ (__read_only__, 1, 2)))
1645 __attribute__ ((__access__ (__read_only__, 3, 4)));
1646extern void *__mempcpy (void *__restrict __dest,
1647 const void *__restrict __src, size_t __n)
1648 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1649extern void *mempcpy (void *__restrict __dest,
1650 const void *__restrict __src, size_t __n)
1651 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1652extern size_t strlen (const char *__s)
1653 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1654extern size_t strnlen (const char *__string, size_t __maxlen)
1655 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1656extern char *strerror (int __errnum) __attribute__ ((__nothrow__ , __leaf__));
1657extern char *strerror_r (int __errnum, char *__buf, size_t __buflen)
1658 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3)));
1659extern const char *strerrordesc_np (int __err) __attribute__ ((__nothrow__ , __leaf__));
1660extern const char *strerrorname_np (int __err) __attribute__ ((__nothrow__ , __leaf__));
1661extern char *strerror_l (int __errnum, locale_t __l) __attribute__ ((__nothrow__ , __leaf__));
1662
1663extern int bcmp (const void *__s1, const void *__s2, size_t __n)
1664 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1665extern void bcopy (const void *__src, void *__dest, size_t __n)
1666 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1667extern void bzero (void *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1668extern char *index (const char *__s, int __c)
1669 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1670extern char *rindex (const char *__s, int __c)
1671 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1672extern int ffs (int __i) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
1673extern int ffsl (long int __l) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
1674__extension__ extern int ffsll (long long int __ll)
1675 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
1676extern int strcasecmp (const char *__s1, const char *__s2)
1677 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1678extern int strncasecmp (const char *__s1, const char *__s2, size_t __n)
1679 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1680extern int strcasecmp_l (const char *__s1, const char *__s2, locale_t __loc)
1681 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3)));
1682extern int strncasecmp_l (const char *__s1, const char *__s2,
1683 size_t __n, locale_t __loc)
1684 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4)));
1685
1686extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void
1687__attribute__ ((__nothrow__ , __leaf__)) bcopy (const void *__src, void *__dest, size_t __len)
1688{
1689 (void) __builtin___memmove_chk (__dest, __src, __len, __builtin_object_size (__dest, 0));
1690}
1691extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void
1692__attribute__ ((__nothrow__ , __leaf__)) bzero (void *__dest, size_t __len)
1693{
1694 (void) __builtin___memset_chk (__dest, '\0', __len, __builtin_object_size (__dest, 0));
1695}
1696extern void explicit_bzero (void *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)))
1697 __attribute__ ((__access__ (__write_only__, 1, 2)));
1698extern char *strsep (char **__restrict __stringp,
1699 const char *__restrict __delim)
1700 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1701extern char *strsignal (int __sig) __attribute__ ((__nothrow__ , __leaf__));
1702extern const char *sigabbrev_np (int __sig) __attribute__ ((__nothrow__ , __leaf__));
1703extern const char *sigdescr_np (int __sig) __attribute__ ((__nothrow__ , __leaf__));
1704extern char *__stpcpy (char *__restrict __dest, const char *__restrict __src)
1705 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1706extern char *stpcpy (char *__restrict __dest, const char *__restrict __src)
1707 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1708extern char *__stpncpy (char *__restrict __dest,
1709 const char *__restrict __src, size_t __n)
1710 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1711extern char *stpncpy (char *__restrict __dest,
1712 const char *__restrict __src, size_t __n)
1713 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1714extern int strverscmp (const char *__s1, const char *__s2)
1715 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1716extern char *strfry (char *__string) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1717extern void *memfrob (void *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)))
1718 __attribute__ ((__access__ (__write_only__, 1, 2)));
1719extern char *basename (const char *__filename) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1720extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void *
1721__attribute__ ((__nothrow__ , __leaf__)) memcpy (void *__restrict __dest, const void *__restrict __src, size_t __len)
1722{
1723 return __builtin___memcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0));
1724}
1725extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void *
1726__attribute__ ((__nothrow__ , __leaf__)) memmove (void *__dest, const void *__src, size_t __len)
1727{
1728 return __builtin___memmove_chk (__dest, __src, __len, __builtin_object_size (__dest, 0));
1729}
1730extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void *
1731__attribute__ ((__nothrow__ , __leaf__)) mempcpy (void *__restrict __dest, const void *__restrict __src, size_t __len)
1732{
1733 return __builtin___mempcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0));
1734}
1735extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void *
1736__attribute__ ((__nothrow__ , __leaf__)) memset (void *__dest, int __ch, size_t __len)
1737{
1738 return __builtin___memset_chk (__dest, __ch, __len, __builtin_object_size (__dest, 0));
1739}
1740void __explicit_bzero_chk (void *__dest, size_t __len, size_t __destlen)
1741 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__access__ (__write_only__, 1, 2)));
1742extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void
1743__attribute__ ((__nothrow__ , __leaf__)) explicit_bzero (void *__dest, size_t __len)
1744{
1745 __explicit_bzero_chk (__dest, __len, __builtin_object_size (__dest, 0));
1746}
1747extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char *
1748__attribute__ ((__nothrow__ , __leaf__)) strcpy (char *__restrict __dest, const char *__restrict __src)
1749{
1750 return __builtin___strcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1));
1751}
1752extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char *
1753__attribute__ ((__nothrow__ , __leaf__)) stpcpy (char *__restrict __dest, const char *__restrict __src)
1754{
1755 return __builtin___stpcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1));
1756}
1757extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char *
1758__attribute__ ((__nothrow__ , __leaf__)) strncpy (char *__restrict __dest, const char *__restrict __src, size_t __len)
1759{
1760 return __builtin___strncpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 2 > 1));
1761}
1762extern char *__stpncpy_chk (char *__dest, const char *__src, size_t __n,
1763 size_t __destlen) __attribute__ ((__nothrow__ , __leaf__))
1764 __attribute__ ((__access__ (__write_only__, 1, 3))) __attribute__ ((__access__ (__read_only__, 2)));
1765extern char *__stpncpy_alias (char *__dest, const char *__src, size_t __n) __asm__ ("" "stpncpy") __attribute__ ((__nothrow__ , __leaf__));
1766extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char *
1767__attribute__ ((__nothrow__ , __leaf__)) stpncpy (char *__dest, const char *__src, size_t __n)
1768{
1769 if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1
1770 && (!__builtin_constant_p (__n) || __n > __builtin_object_size (__dest, 2 > 1)))
1771 return __stpncpy_chk (__dest, __src, __n, __builtin_object_size (__dest, 2 > 1));
1772 return __stpncpy_alias (__dest, __src, __n);
1773}
1774extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char *
1775__attribute__ ((__nothrow__ , __leaf__)) strcat (char *__restrict __dest, const char *__restrict __src)
1776{
1777 return __builtin___strcat_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1));
1778}
1779extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char *
1780__attribute__ ((__nothrow__ , __leaf__)) strncat (char *__restrict __dest, const char *__restrict __src, size_t __len)
1781{
1782 return __builtin___strncat_chk (__dest, __src, __len, __builtin_object_size (__dest, 2 > 1));
1783}
1784
1785typedef __uint8_t uint8_t;
1786typedef __uint16_t uint16_t;
1787typedef __uint32_t uint32_t;
1788typedef __uint64_t uint64_t;
1789typedef __int_least8_t int_least8_t;
1790typedef __int_least16_t int_least16_t;
1791typedef __int_least32_t int_least32_t;
1792typedef __int_least64_t int_least64_t;
1793typedef __uint_least8_t uint_least8_t;
1794typedef __uint_least16_t uint_least16_t;
1795typedef __uint_least32_t uint_least32_t;
1796typedef __uint_least64_t uint_least64_t;
1797typedef signed char int_fast8_t;
1798typedef long int int_fast16_t;
1799typedef long int int_fast32_t;
1800typedef long int int_fast64_t;
1801typedef unsigned char uint_fast8_t;
1802typedef unsigned long int uint_fast16_t;
1803typedef unsigned long int uint_fast32_t;
1804typedef unsigned long int uint_fast64_t;
1805typedef long int intptr_t;
1806typedef unsigned long int uintptr_t;
1807typedef __intmax_t intmax_t;
1808typedef __uintmax_t uintmax_t;
1809typedef int __gwchar_t;
1810
1811typedef struct
1812 {
1813 long int quot;
1814 long int rem;
1815 } imaxdiv_t;
1816extern intmax_t imaxabs (intmax_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
1817extern imaxdiv_t imaxdiv (intmax_t __numer, intmax_t __denom)
1818 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
1819extern intmax_t strtoimax (const char *__restrict __nptr,
1820 char **__restrict __endptr, int __base) __attribute__ ((__nothrow__ , __leaf__));
1821extern uintmax_t strtoumax (const char *__restrict __nptr,
1822 char ** __restrict __endptr, int __base) __attribute__ ((__nothrow__ , __leaf__));
1823extern intmax_t wcstoimax (const __gwchar_t *__restrict __nptr,
1824 __gwchar_t **__restrict __endptr, int __base)
1825 __attribute__ ((__nothrow__ , __leaf__));
1826extern uintmax_t wcstoumax (const __gwchar_t *__restrict __nptr,
1827 __gwchar_t ** __restrict __endptr, int __base)
1828 __attribute__ ((__nothrow__ , __leaf__));
1829extern long int __strtol_internal (const char *__restrict __nptr,
1830 char **__restrict __endptr,
1831 int __base, int __group)
1832 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1833extern __inline __attribute__ ((__gnu_inline__)) intmax_t
1834__attribute__ ((__nothrow__ , __leaf__)) strtoimax (const char *__restrict __nptr, char **__restrict __endptr, int __base)
1835{
1836 return __strtol_internal (__nptr, __endptr, __base, 0);
1837}
1838extern unsigned long int __strtoul_internal (const char *__restrict __nptr,
1839 char ** __restrict __endptr,
1840 int __base, int __group)
1841 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1842extern __inline __attribute__ ((__gnu_inline__)) uintmax_t
1843__attribute__ ((__nothrow__ , __leaf__)) strtoumax (const char *__restrict __nptr, char **__restrict __endptr, int __base)
1844{
1845 return __strtoul_internal (__nptr, __endptr, __base, 0);
1846}
1847extern long int __wcstol_internal (const __gwchar_t * __restrict __nptr,
1848 __gwchar_t **__restrict __endptr,
1849 int __base, int __group)
1850 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1851extern __inline __attribute__ ((__gnu_inline__)) intmax_t
1852__attribute__ ((__nothrow__ , __leaf__)) wcstoimax (const __gwchar_t *__restrict __nptr, __gwchar_t **__restrict __endptr, int __base)
1853{
1854 return __wcstol_internal (__nptr, __endptr, __base, 0);
1855}
1856extern unsigned long int __wcstoul_internal (const __gwchar_t *
1857 __restrict __nptr,
1858 __gwchar_t **
1859 __restrict __endptr,
1860 int __base, int __group)
1861 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1862extern __inline __attribute__ ((__gnu_inline__)) uintmax_t
1863__attribute__ ((__nothrow__ , __leaf__)) wcstoumax (const __gwchar_t *__restrict __nptr, __gwchar_t **__restrict __endptr, int __base)
1864{
1865 return __wcstoul_internal (__nptr, __endptr, __base, 0);
1866}
1867
1868
1869typedef __socklen_t socklen_t;
1870extern int access (const char *__name, int __type) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1871extern int euidaccess (const char *__name, int __type)
1872 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1873extern int eaccess (const char *__name, int __type)
1874 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1875extern int faccessat (int __fd, const char *__file, int __type, int __flag)
1876 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__));
1877extern __off_t lseek (int __fd, __off_t __offset, int __whence) __attribute__ ((__nothrow__ , __leaf__));
1878extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence)
1879 __attribute__ ((__nothrow__ , __leaf__));
1880extern int close (int __fd);
1881extern ssize_t read (int __fd, void *__buf, size_t __nbytes) __attribute__ ((__warn_unused_result__))
1882 __attribute__ ((__access__ (__write_only__, 2, 3)));
1883extern ssize_t write (int __fd, const void *__buf, size_t __n) __attribute__ ((__warn_unused_result__))
1884 __attribute__ ((__access__ (__read_only__, 2, 3)));
1885extern ssize_t pread (int __fd, void *__buf, size_t __nbytes,
1886 __off_t __offset) __attribute__ ((__warn_unused_result__))
1887 __attribute__ ((__access__ (__write_only__, 2, 3)));
1888extern ssize_t pwrite (int __fd, const void *__buf, size_t __n,
1889 __off_t __offset) __attribute__ ((__warn_unused_result__))
1890 __attribute__ ((__access__ (__read_only__, 2, 3)));
1891extern ssize_t pread64 (int __fd, void *__buf, size_t __nbytes,
1892 __off64_t __offset) __attribute__ ((__warn_unused_result__))
1893 __attribute__ ((__access__ (__write_only__, 2, 3)));
1894extern ssize_t pwrite64 (int __fd, const void *__buf, size_t __n,
1895 __off64_t __offset) __attribute__ ((__warn_unused_result__))
1896 __attribute__ ((__access__ (__read_only__, 2, 3)));
1897extern int pipe (int __pipedes[2]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1898extern int pipe2 (int __pipedes[2], int __flags) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1899extern unsigned int alarm (unsigned int __seconds) __attribute__ ((__nothrow__ , __leaf__));
1900extern unsigned int sleep (unsigned int __seconds);
1901extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval)
1902 __attribute__ ((__nothrow__ , __leaf__));
1903extern int usleep (__useconds_t __useconds);
1904extern int pause (void);
1905extern int chown (const char *__file, __uid_t __owner, __gid_t __group)
1906 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1907extern int fchown (int __fd, __uid_t __owner, __gid_t __group) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1908extern int lchown (const char *__file, __uid_t __owner, __gid_t __group)
1909 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1910extern int fchownat (int __fd, const char *__file, __uid_t __owner,
1911 __gid_t __group, int __flag)
1912 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__));
1913extern int chdir (const char *__path) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1914extern int fchdir (int __fd) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1915extern char *getcwd (char *__buf, size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__))
1916 __attribute__ ((__access__ (__write_only__, 1, 2)));
1917extern char *get_current_dir_name (void) __attribute__ ((__nothrow__ , __leaf__));
1918extern char *getwd (char *__buf)
1919 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) __attribute__ ((__warn_unused_result__))
1920 __attribute__ ((__access__ (__write_only__, 1)));
1921extern int dup (int __fd) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1922extern int dup2 (int __fd, int __fd2) __attribute__ ((__nothrow__ , __leaf__));
1923extern int dup3 (int __fd, int __fd2, int __flags) __attribute__ ((__nothrow__ , __leaf__));
1924extern char **__environ;
1925extern char **environ;
1926extern int execve (const char *__path, char *const __argv[],
1927 char *const __envp[]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1928extern int fexecve (int __fd, char *const __argv[], char *const __envp[])
1929 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
1930extern int execv (const char *__path, char *const __argv[])
1931 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1932extern int execle (const char *__path, const char *__arg, ...)
1933 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1934extern int execl (const char *__path, const char *__arg, ...)
1935 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1936extern int execvp (const char *__file, char *const __argv[])
1937 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1938extern int execlp (const char *__file, const char *__arg, ...)
1939 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1940extern int execvpe (const char *__file, char *const __argv[],
1941 char *const __envp[])
1942 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1943extern int nice (int __inc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1944extern void _exit (int __status) __attribute__ ((__noreturn__));
1945enum
1946 {
1947 _PC_LINK_MAX,
1948 _PC_MAX_CANON,
1949 _PC_MAX_INPUT,
1950 _PC_NAME_MAX,
1951 _PC_PATH_MAX,
1952 _PC_PIPE_BUF,
1953 _PC_CHOWN_RESTRICTED,
1954 _PC_NO_TRUNC,
1955 _PC_VDISABLE,
1956 _PC_SYNC_IO,
1957 _PC_ASYNC_IO,
1958 _PC_PRIO_IO,
1959 _PC_SOCK_MAXBUF,
1960 _PC_FILESIZEBITS,
1961 _PC_REC_INCR_XFER_SIZE,
1962 _PC_REC_MAX_XFER_SIZE,
1963 _PC_REC_MIN_XFER_SIZE,
1964 _PC_REC_XFER_ALIGN,
1965 _PC_ALLOC_SIZE_MIN,
1966 _PC_SYMLINK_MAX,
1967 _PC_2_SYMLINKS
1968 };
1969enum
1970 {
1971 _SC_ARG_MAX,
1972 _SC_CHILD_MAX,
1973 _SC_CLK_TCK,
1974 _SC_NGROUPS_MAX,
1975 _SC_OPEN_MAX,
1976 _SC_STREAM_MAX,
1977 _SC_TZNAME_MAX,
1978 _SC_JOB_CONTROL,
1979 _SC_SAVED_IDS,
1980 _SC_REALTIME_SIGNALS,
1981 _SC_PRIORITY_SCHEDULING,
1982 _SC_TIMERS,
1983 _SC_ASYNCHRONOUS_IO,
1984 _SC_PRIORITIZED_IO,
1985 _SC_SYNCHRONIZED_IO,
1986 _SC_FSYNC,
1987 _SC_MAPPED_FILES,
1988 _SC_MEMLOCK,
1989 _SC_MEMLOCK_RANGE,
1990 _SC_MEMORY_PROTECTION,
1991 _SC_MESSAGE_PASSING,
1992 _SC_SEMAPHORES,
1993 _SC_SHARED_MEMORY_OBJECTS,
1994 _SC_AIO_LISTIO_MAX,
1995 _SC_AIO_MAX,
1996 _SC_AIO_PRIO_DELTA_MAX,
1997 _SC_DELAYTIMER_MAX,
1998 _SC_MQ_OPEN_MAX,
1999 _SC_MQ_PRIO_MAX,
2000 _SC_VERSION,
2001 _SC_PAGESIZE,
2002 _SC_RTSIG_MAX,
2003 _SC_SEM_NSEMS_MAX,
2004 _SC_SEM_VALUE_MAX,
2005 _SC_SIGQUEUE_MAX,
2006 _SC_TIMER_MAX,
2007 _SC_BC_BASE_MAX,
2008 _SC_BC_DIM_MAX,
2009 _SC_BC_SCALE_MAX,
2010 _SC_BC_STRING_MAX,
2011 _SC_COLL_WEIGHTS_MAX,
2012 _SC_EQUIV_CLASS_MAX,
2013 _SC_EXPR_NEST_MAX,
2014 _SC_LINE_MAX,
2015 _SC_RE_DUP_MAX,
2016 _SC_CHARCLASS_NAME_MAX,
2017 _SC_2_VERSION,
2018 _SC_2_C_BIND,
2019 _SC_2_C_DEV,
2020 _SC_2_FORT_DEV,
2021 _SC_2_FORT_RUN,
2022 _SC_2_SW_DEV,
2023 _SC_2_LOCALEDEF,
2024 _SC_PII,
2025 _SC_PII_XTI,
2026 _SC_PII_SOCKET,
2027 _SC_PII_INTERNET,
2028 _SC_PII_OSI,
2029 _SC_POLL,
2030 _SC_SELECT,
2031 _SC_UIO_MAXIOV,
2032 _SC_IOV_MAX = _SC_UIO_MAXIOV,
2033 _SC_PII_INTERNET_STREAM,
2034 _SC_PII_INTERNET_DGRAM,
2035 _SC_PII_OSI_COTS,
2036 _SC_PII_OSI_CLTS,
2037 _SC_PII_OSI_M,
2038 _SC_T_IOV_MAX,
2039 _SC_THREADS,
2040 _SC_THREAD_SAFE_FUNCTIONS,
2041 _SC_GETGR_R_SIZE_MAX,
2042 _SC_GETPW_R_SIZE_MAX,
2043 _SC_LOGIN_NAME_MAX,
2044 _SC_TTY_NAME_MAX,
2045 _SC_THREAD_DESTRUCTOR_ITERATIONS,
2046 _SC_THREAD_KEYS_MAX,
2047 _SC_THREAD_STACK_MIN,
2048 _SC_THREAD_THREADS_MAX,
2049 _SC_THREAD_ATTR_STACKADDR,
2050 _SC_THREAD_ATTR_STACKSIZE,
2051 _SC_THREAD_PRIORITY_SCHEDULING,
2052 _SC_THREAD_PRIO_INHERIT,
2053 _SC_THREAD_PRIO_PROTECT,
2054 _SC_THREAD_PROCESS_SHARED,
2055 _SC_NPROCESSORS_CONF,
2056 _SC_NPROCESSORS_ONLN,
2057 _SC_PHYS_PAGES,
2058 _SC_AVPHYS_PAGES,
2059 _SC_ATEXIT_MAX,
2060 _SC_PASS_MAX,
2061 _SC_XOPEN_VERSION,
2062 _SC_XOPEN_XCU_VERSION,
2063 _SC_XOPEN_UNIX,
2064 _SC_XOPEN_CRYPT,
2065 _SC_XOPEN_ENH_I18N,
2066 _SC_XOPEN_SHM,
2067 _SC_2_CHAR_TERM,
2068 _SC_2_C_VERSION,
2069 _SC_2_UPE,
2070 _SC_XOPEN_XPG2,
2071 _SC_XOPEN_XPG3,
2072 _SC_XOPEN_XPG4,
2073 _SC_CHAR_BIT,
2074 _SC_CHAR_MAX,
2075 _SC_CHAR_MIN,
2076 _SC_INT_MAX,
2077 _SC_INT_MIN,
2078 _SC_LONG_BIT,
2079 _SC_WORD_BIT,
2080 _SC_MB_LEN_MAX,
2081 _SC_NZERO,
2082 _SC_SSIZE_MAX,
2083 _SC_SCHAR_MAX,
2084 _SC_SCHAR_MIN,
2085 _SC_SHRT_MAX,
2086 _SC_SHRT_MIN,
2087 _SC_UCHAR_MAX,
2088 _SC_UINT_MAX,
2089 _SC_ULONG_MAX,
2090 _SC_USHRT_MAX,
2091 _SC_NL_ARGMAX,
2092 _SC_NL_LANGMAX,
2093 _SC_NL_MSGMAX,
2094 _SC_NL_NMAX,
2095 _SC_NL_SETMAX,
2096 _SC_NL_TEXTMAX,
2097 _SC_XBS5_ILP32_OFF32,
2098 _SC_XBS5_ILP32_OFFBIG,
2099 _SC_XBS5_LP64_OFF64,
2100 _SC_XBS5_LPBIG_OFFBIG,
2101 _SC_XOPEN_LEGACY,
2102 _SC_XOPEN_REALTIME,
2103 _SC_XOPEN_REALTIME_THREADS,
2104 _SC_ADVISORY_INFO,
2105 _SC_BARRIERS,
2106 _SC_BASE,
2107 _SC_C_LANG_SUPPORT,
2108 _SC_C_LANG_SUPPORT_R,
2109 _SC_CLOCK_SELECTION,
2110 _SC_CPUTIME,
2111 _SC_THREAD_CPUTIME,
2112 _SC_DEVICE_IO,
2113 _SC_DEVICE_SPECIFIC,
2114 _SC_DEVICE_SPECIFIC_R,
2115 _SC_FD_MGMT,
2116 _SC_FIFO,
2117 _SC_PIPE,
2118 _SC_FILE_ATTRIBUTES,
2119 _SC_FILE_LOCKING,
2120 _SC_FILE_SYSTEM,
2121 _SC_MONOTONIC_CLOCK,
2122 _SC_MULTI_PROCESS,
2123 _SC_SINGLE_PROCESS,
2124 _SC_NETWORKING,
2125 _SC_READER_WRITER_LOCKS,
2126 _SC_SPIN_LOCKS,
2127 _SC_REGEXP,
2128 _SC_REGEX_VERSION,
2129 _SC_SHELL,
2130 _SC_SIGNALS,
2131 _SC_SPAWN,
2132 _SC_SPORADIC_SERVER,
2133 _SC_THREAD_SPORADIC_SERVER,
2134 _SC_SYSTEM_DATABASE,
2135 _SC_SYSTEM_DATABASE_R,
2136 _SC_TIMEOUTS,
2137 _SC_TYPED_MEMORY_OBJECTS,
2138 _SC_USER_GROUPS,
2139 _SC_USER_GROUPS_R,
2140 _SC_2_PBS,
2141 _SC_2_PBS_ACCOUNTING,
2142 _SC_2_PBS_LOCATE,
2143 _SC_2_PBS_MESSAGE,
2144 _SC_2_PBS_TRACK,
2145 _SC_SYMLOOP_MAX,
2146 _SC_STREAMS,
2147 _SC_2_PBS_CHECKPOINT,
2148 _SC_V6_ILP32_OFF32,
2149 _SC_V6_ILP32_OFFBIG,
2150 _SC_V6_LP64_OFF64,
2151 _SC_V6_LPBIG_OFFBIG,
2152 _SC_HOST_NAME_MAX,
2153 _SC_TRACE,
2154 _SC_TRACE_EVENT_FILTER,
2155 _SC_TRACE_INHERIT,
2156 _SC_TRACE_LOG,
2157 _SC_LEVEL1_ICACHE_SIZE,
2158 _SC_LEVEL1_ICACHE_ASSOC,
2159 _SC_LEVEL1_ICACHE_LINESIZE,
2160 _SC_LEVEL1_DCACHE_SIZE,
2161 _SC_LEVEL1_DCACHE_ASSOC,
2162 _SC_LEVEL1_DCACHE_LINESIZE,
2163 _SC_LEVEL2_CACHE_SIZE,
2164 _SC_LEVEL2_CACHE_ASSOC,
2165 _SC_LEVEL2_CACHE_LINESIZE,
2166 _SC_LEVEL3_CACHE_SIZE,
2167 _SC_LEVEL3_CACHE_ASSOC,
2168 _SC_LEVEL3_CACHE_LINESIZE,
2169 _SC_LEVEL4_CACHE_SIZE,
2170 _SC_LEVEL4_CACHE_ASSOC,
2171 _SC_LEVEL4_CACHE_LINESIZE,
2172 _SC_IPV6 = _SC_LEVEL1_ICACHE_SIZE + 50,
2173 _SC_RAW_SOCKETS,
2174 _SC_V7_ILP32_OFF32,
2175 _SC_V7_ILP32_OFFBIG,
2176 _SC_V7_LP64_OFF64,
2177 _SC_V7_LPBIG_OFFBIG,
2178 _SC_SS_REPL_MAX,
2179 _SC_TRACE_EVENT_NAME_MAX,
2180 _SC_TRACE_NAME_MAX,
2181 _SC_TRACE_SYS_MAX,
2182 _SC_TRACE_USER_EVENT_MAX,
2183 _SC_XOPEN_STREAMS,
2184 _SC_THREAD_ROBUST_PRIO_INHERIT,
2185 _SC_THREAD_ROBUST_PRIO_PROTECT
2186 };
2187enum
2188 {
2189 _CS_PATH,
2190 _CS_V6_WIDTH_RESTRICTED_ENVS,
2191 _CS_GNU_LIBC_VERSION,
2192 _CS_GNU_LIBPTHREAD_VERSION,
2193 _CS_V5_WIDTH_RESTRICTED_ENVS,
2194 _CS_V7_WIDTH_RESTRICTED_ENVS,
2195 _CS_LFS_CFLAGS = 1000,
2196 _CS_LFS_LDFLAGS,
2197 _CS_LFS_LIBS,
2198 _CS_LFS_LINTFLAGS,
2199 _CS_LFS64_CFLAGS,
2200 _CS_LFS64_LDFLAGS,
2201 _CS_LFS64_LIBS,
2202 _CS_LFS64_LINTFLAGS,
2203 _CS_XBS5_ILP32_OFF32_CFLAGS = 1100,
2204 _CS_XBS5_ILP32_OFF32_LDFLAGS,
2205 _CS_XBS5_ILP32_OFF32_LIBS,
2206 _CS_XBS5_ILP32_OFF32_LINTFLAGS,
2207 _CS_XBS5_ILP32_OFFBIG_CFLAGS,
2208 _CS_XBS5_ILP32_OFFBIG_LDFLAGS,
2209 _CS_XBS5_ILP32_OFFBIG_LIBS,
2210 _CS_XBS5_ILP32_OFFBIG_LINTFLAGS,
2211 _CS_XBS5_LP64_OFF64_CFLAGS,
2212 _CS_XBS5_LP64_OFF64_LDFLAGS,
2213 _CS_XBS5_LP64_OFF64_LIBS,
2214 _CS_XBS5_LP64_OFF64_LINTFLAGS,
2215 _CS_XBS5_LPBIG_OFFBIG_CFLAGS,
2216 _CS_XBS5_LPBIG_OFFBIG_LDFLAGS,
2217 _CS_XBS5_LPBIG_OFFBIG_LIBS,
2218 _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS,
2219 _CS_POSIX_V6_ILP32_OFF32_CFLAGS,
2220 _CS_POSIX_V6_ILP32_OFF32_LDFLAGS,
2221 _CS_POSIX_V6_ILP32_OFF32_LIBS,
2222 _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS,
2223 _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS,
2224 _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS,
2225 _CS_POSIX_V6_ILP32_OFFBIG_LIBS,
2226 _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS,
2227 _CS_POSIX_V6_LP64_OFF64_CFLAGS,
2228 _CS_POSIX_V6_LP64_OFF64_LDFLAGS,
2229 _CS_POSIX_V6_LP64_OFF64_LIBS,
2230 _CS_POSIX_V6_LP64_OFF64_LINTFLAGS,
2231 _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS,
2232 _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS,
2233 _CS_POSIX_V6_LPBIG_OFFBIG_LIBS,
2234 _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS,
2235 _CS_POSIX_V7_ILP32_OFF32_CFLAGS,
2236 _CS_POSIX_V7_ILP32_OFF32_LDFLAGS,
2237 _CS_POSIX_V7_ILP32_OFF32_LIBS,
2238 _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS,
2239 _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS,
2240 _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS,
2241 _CS_POSIX_V7_ILP32_OFFBIG_LIBS,
2242 _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS,
2243 _CS_POSIX_V7_LP64_OFF64_CFLAGS,
2244 _CS_POSIX_V7_LP64_OFF64_LDFLAGS,
2245 _CS_POSIX_V7_LP64_OFF64_LIBS,
2246 _CS_POSIX_V7_LP64_OFF64_LINTFLAGS,
2247 _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS,
2248 _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS,
2249 _CS_POSIX_V7_LPBIG_OFFBIG_LIBS,
2250 _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS,
2251 _CS_V6_ENV,
2252 _CS_V7_ENV
2253 };
2254extern long int pathconf (const char *__path, int __name)
2255 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2256extern long int fpathconf (int __fd, int __name) __attribute__ ((__nothrow__ , __leaf__));
2257extern long int sysconf (int __name) __attribute__ ((__nothrow__ , __leaf__));
2258extern size_t confstr (int __name, char *__buf, size_t __len) __attribute__ ((__nothrow__ , __leaf__))
2259 __attribute__ ((__access__ (__write_only__, 2, 3)));
2260extern __pid_t getpid (void) __attribute__ ((__nothrow__ , __leaf__));
2261extern __pid_t getppid (void) __attribute__ ((__nothrow__ , __leaf__));
2262extern __pid_t getpgrp (void) __attribute__ ((__nothrow__ , __leaf__));
2263extern __pid_t __getpgid (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__));
2264extern __pid_t getpgid (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__));
2265extern int setpgid (__pid_t __pid, __pid_t __pgid) __attribute__ ((__nothrow__ , __leaf__));
2266extern int setpgrp (void) __attribute__ ((__nothrow__ , __leaf__));
2267extern __pid_t setsid (void) __attribute__ ((__nothrow__ , __leaf__));
2268extern __pid_t getsid (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__));
2269extern __uid_t getuid (void) __attribute__ ((__nothrow__ , __leaf__));
2270extern __uid_t geteuid (void) __attribute__ ((__nothrow__ , __leaf__));
2271extern __gid_t getgid (void) __attribute__ ((__nothrow__ , __leaf__));
2272extern __gid_t getegid (void) __attribute__ ((__nothrow__ , __leaf__));
2273extern int getgroups (int __size, __gid_t __list[]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__))
2274 __attribute__ ((__access__ (__write_only__, 2, 1)));
2275extern int group_member (__gid_t __gid) __attribute__ ((__nothrow__ , __leaf__));
2276extern int setuid (__uid_t __uid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2277extern int setreuid (__uid_t __ruid, __uid_t __euid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2278extern int seteuid (__uid_t __uid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2279extern int setgid (__gid_t __gid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2280extern int setregid (__gid_t __rgid, __gid_t __egid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2281extern int setegid (__gid_t __gid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2282extern int getresuid (__uid_t *__ruid, __uid_t *__euid, __uid_t *__suid)
2283 __attribute__ ((__nothrow__ , __leaf__));
2284extern int getresgid (__gid_t *__rgid, __gid_t *__egid, __gid_t *__sgid)
2285 __attribute__ ((__nothrow__ , __leaf__));
2286extern int setresuid (__uid_t __ruid, __uid_t __euid, __uid_t __suid)
2287 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2288extern int setresgid (__gid_t __rgid, __gid_t __egid, __gid_t __sgid)
2289 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2290extern __pid_t fork (void) __attribute__ ((__nothrow__));
2291extern __pid_t vfork (void) __attribute__ ((__nothrow__ , __leaf__));
2292extern char *ttyname (int __fd) __attribute__ ((__nothrow__ , __leaf__));
2293extern int ttyname_r (int __fd, char *__buf, size_t __buflen)
2294 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3)));
2295extern int isatty (int __fd) __attribute__ ((__nothrow__ , __leaf__));
2296extern int ttyslot (void) __attribute__ ((__nothrow__ , __leaf__));
2297extern int link (const char *__from, const char *__to)
2298 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__));
2299extern int linkat (int __fromfd, const char *__from, int __tofd,
2300 const char *__to, int __flags)
2301 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4))) __attribute__ ((__warn_unused_result__));
2302extern int symlink (const char *__from, const char *__to)
2303 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__));
2304extern ssize_t readlink (const char *__restrict __path,
2305 char *__restrict __buf, size_t __len)
2306 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3)));
2307extern int symlinkat (const char *__from, int __tofd,
2308 const char *__to) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__));
2309extern ssize_t readlinkat (int __fd, const char *__restrict __path,
2310 char *__restrict __buf, size_t __len)
2311 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__read_only__, 3, 4)));
2312extern int unlink (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2313extern int unlinkat (int __fd, const char *__name, int __flag)
2314 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
2315extern int rmdir (const char *__path) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2316extern __pid_t tcgetpgrp (int __fd) __attribute__ ((__nothrow__ , __leaf__));
2317extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) __attribute__ ((__nothrow__ , __leaf__));
2318extern char *getlogin (void);
2319extern int getlogin_r (char *__name, size_t __name_len) __attribute__ ((__nonnull__ (1)))
2320 __attribute__ ((__access__ (__write_only__, 1, 2)));
2321extern int setlogin (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2322
2323extern char *optarg;
2324extern int optind;
2325extern int opterr;
2326extern int optopt;
2327extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
2328 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3)));
2329
2330
2331
2332extern int gethostname (char *__name, size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)))
2333 __attribute__ ((__access__ (__write_only__, 1, 2)));
2334extern int sethostname (const char *__name, size_t __len)
2335 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__read_only__, 1, 2)));
2336extern int sethostid (long int __id) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2337extern int getdomainname (char *__name, size_t __len)
2338 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 2)));
2339extern int setdomainname (const char *__name, size_t __len)
2340 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__read_only__, 1, 2)));
2341extern int vhangup (void) __attribute__ ((__nothrow__ , __leaf__));
2342extern int revoke (const char *__file) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
2343extern int profil (unsigned short int *__sample_buffer, size_t __size,
2344 size_t __offset, unsigned int __scale)
2345 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2346extern int acct (const char *__name) __attribute__ ((__nothrow__ , __leaf__));
2347extern char *getusershell (void) __attribute__ ((__nothrow__ , __leaf__));
2348extern void endusershell (void) __attribute__ ((__nothrow__ , __leaf__));
2349extern void setusershell (void) __attribute__ ((__nothrow__ , __leaf__));
2350extern int daemon (int __nochdir, int __noclose) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2351extern int chroot (const char *__path) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
2352extern char *getpass (const char *__prompt) __attribute__ ((__nonnull__ (1)));
2353extern int fsync (int __fd);
2354extern int syncfs (int __fd) __attribute__ ((__nothrow__ , __leaf__));
2355extern long int gethostid (void);
2356extern void sync (void) __attribute__ ((__nothrow__ , __leaf__));
2357extern int getpagesize (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2358extern int getdtablesize (void) __attribute__ ((__nothrow__ , __leaf__));
2359extern int truncate (const char *__file, __off_t __length)
2360 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
2361extern int truncate64 (const char *__file, __off64_t __length)
2362 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
2363extern int ftruncate (int __fd, __off_t __length) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2364extern int ftruncate64 (int __fd, __off64_t __length) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2365extern int brk (void *__addr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2366extern void *sbrk (intptr_t __delta) __attribute__ ((__nothrow__ , __leaf__));
2367extern long int syscall (long int __sysno, ...) __attribute__ ((__nothrow__ , __leaf__));
2368extern int lockf (int __fd, int __cmd, __off_t __len) __attribute__ ((__warn_unused_result__));
2369extern int lockf64 (int __fd, int __cmd, __off64_t __len) __attribute__ ((__warn_unused_result__));
2370ssize_t copy_file_range (int __infd, __off64_t *__pinoff,
2371 int __outfd, __off64_t *__poutoff,
2372 size_t __length, unsigned int __flags);
2373extern int fdatasync (int __fildes);
2374extern char *crypt (const char *__key, const char *__salt)
2375 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
2376extern void swab (const void *__restrict __from, void *__restrict __to,
2377 ssize_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)))
2378 __attribute__ ((__access__ (__read_only__, 1, 3)))
2379 __attribute__ ((__access__ (__write_only__, 2, 3)));
2380int getentropy (void *__buffer, size_t __length) __attribute__ ((__warn_unused_result__))
2381 __attribute__ ((__access__ (__write_only__, 1, 2)));
2382extern ssize_t __read_chk (int __fd, void *__buf, size_t __nbytes,
2383 size_t __buflen)
2384 __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3)));
2385extern ssize_t __read_alias (int __fd, void *__buf, size_t __nbytes) __asm__ ("" "read")
2386 __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3)));
2387extern ssize_t __read_chk_warn (int __fd, void *__buf, size_t __nbytes, size_t __buflen) __asm__ ("" "__read_chk")
2388 __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("read called with bigger length than size of " "the destination buffer")));
2389extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t
2390read (int __fd, void *__buf, size_t __nbytes)
2391{
2392 if (__builtin_object_size (__buf, 0) != (size_t) -1)
2393 {
2394 if (!__builtin_constant_p (__nbytes))
2395 return __read_chk (__fd, __buf, __nbytes, __builtin_object_size (__buf, 0));
2396 if (__nbytes > __builtin_object_size (__buf, 0))
2397 return __read_chk_warn (__fd, __buf, __nbytes, __builtin_object_size (__buf, 0));
2398 }
2399 return __read_alias (__fd, __buf, __nbytes);
2400}
2401extern ssize_t __pread_chk (int __fd, void *__buf, size_t __nbytes,
2402 __off_t __offset, size_t __bufsize)
2403 __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3)));
2404extern ssize_t __pread64_chk (int __fd, void *__buf, size_t __nbytes,
2405 __off64_t __offset, size_t __bufsize)
2406 __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3)));
2407extern ssize_t __pread_alias (int __fd, void *__buf, size_t __nbytes, __off_t __offset) __asm__ ("" "pread")
2408 __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3)));
2409extern ssize_t __pread64_alias (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) __asm__ ("" "pread64")
2410 __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3)));
2411extern ssize_t __pread_chk_warn (int __fd, void *__buf, size_t __nbytes, __off_t __offset, size_t __bufsize) __asm__ ("" "__pread_chk")
2412 __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("pread called with bigger length than size of " "the destination buffer")));
2413extern ssize_t __pread64_chk_warn (int __fd, void *__buf, size_t __nbytes, __off64_t __offset, size_t __bufsize) __asm__ ("" "__pread64_chk")
2414 __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("pread64 called with bigger length than size of " "the destination buffer")));
2415extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t
2416pread (int __fd, void *__buf, size_t __nbytes, __off_t __offset)
2417{
2418 if (__builtin_object_size (__buf, 0) != (size_t) -1)
2419 {
2420 if (!__builtin_constant_p (__nbytes))
2421 return __pread_chk (__fd, __buf, __nbytes, __offset, __builtin_object_size (__buf, 0));
2422 if ( __nbytes > __builtin_object_size (__buf, 0))
2423 return __pread_chk_warn (__fd, __buf, __nbytes, __offset,
2424 __builtin_object_size (__buf, 0));
2425 }
2426 return __pread_alias (__fd, __buf, __nbytes, __offset);
2427}
2428extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t
2429pread64 (int __fd, void *__buf, size_t __nbytes, __off64_t __offset)
2430{
2431 if (__builtin_object_size (__buf, 0) != (size_t) -1)
2432 {
2433 if (!__builtin_constant_p (__nbytes))
2434 return __pread64_chk (__fd, __buf, __nbytes, __offset, __builtin_object_size (__buf, 0));
2435 if ( __nbytes > __builtin_object_size (__buf, 0))
2436 return __pread64_chk_warn (__fd, __buf, __nbytes, __offset,
2437 __builtin_object_size (__buf, 0));
2438 }
2439 return __pread64_alias (__fd, __buf, __nbytes, __offset);
2440}
2441extern ssize_t __readlink_chk (const char *__restrict __path,
2442 char *__restrict __buf, size_t __len,
2443 size_t __buflen)
2444 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3)));
2445extern ssize_t __readlink_alias (const char *__restrict __path, char *__restrict __buf, size_t __len) __asm__ ("" "readlink") __attribute__ ((__nothrow__ , __leaf__))
2446 __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3)));
2447extern ssize_t __readlink_chk_warn (const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) __asm__ ("" "__readlink_chk") __attribute__ ((__nothrow__ , __leaf__))
2448 __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("readlink called with bigger length " "than size of destination buffer")));
2449extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) ssize_t
2450__attribute__ ((__nothrow__ , __leaf__)) readlink (const char *__restrict __path, char *__restrict __buf, size_t __len)
2451{
2452 if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
2453 {
2454 if (!__builtin_constant_p (__len))
2455 return __readlink_chk (__path, __buf, __len, __builtin_object_size (__buf, 2 > 1));
2456 if ( __len > __builtin_object_size (__buf, 2 > 1))
2457 return __readlink_chk_warn (__path, __buf, __len, __builtin_object_size (__buf, 2 > 1));
2458 }
2459 return __readlink_alias (__path, __buf, __len);
2460}
2461extern ssize_t __readlinkat_chk (int __fd, const char *__restrict __path,
2462 char *__restrict __buf, size_t __len,
2463 size_t __buflen)
2464 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 3, 4)));
2465extern ssize_t __readlinkat_alias (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len) __asm__ ("" "readlinkat") __attribute__ ((__nothrow__ , __leaf__))
2466 __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 3, 4)));
2467extern ssize_t __readlinkat_chk_warn (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) __asm__ ("" "__readlinkat_chk") __attribute__ ((__nothrow__ , __leaf__))
2468 __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("readlinkat called with bigger " "length than size of destination " "buffer")));
2469extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) ssize_t
2470__attribute__ ((__nothrow__ , __leaf__)) readlinkat (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len)
2471{
2472 if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
2473 {
2474 if (!__builtin_constant_p (__len))
2475 return __readlinkat_chk (__fd, __path, __buf, __len, __builtin_object_size (__buf, 2 > 1));
2476 if (__len > __builtin_object_size (__buf, 2 > 1))
2477 return __readlinkat_chk_warn (__fd, __path, __buf, __len,
2478 __builtin_object_size (__buf, 2 > 1));
2479 }
2480 return __readlinkat_alias (__fd, __path, __buf, __len);
2481}
2482extern char *__getcwd_chk (char *__buf, size_t __size, size_t __buflen)
2483 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 2)));
2484extern char *__getcwd_alias (char *__buf, size_t __size) __asm__ ("" "getcwd") __attribute__ ((__nothrow__ , __leaf__))
2485 __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 2)));
2486extern char *__getcwd_chk_warn (char *__buf, size_t __size, size_t __buflen) __asm__ ("" "__getcwd_chk") __attribute__ ((__nothrow__ , __leaf__))
2487 __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getcwd caller with bigger length than size of " "destination buffer")));
2488extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char *
2489__attribute__ ((__nothrow__ , __leaf__)) getcwd (char *__buf, size_t __size)
2490{
2491 if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
2492 {
2493 if (!__builtin_constant_p (__size))
2494 return __getcwd_chk (__buf, __size, __builtin_object_size (__buf, 2 > 1));
2495 if (__size > __builtin_object_size (__buf, 2 > 1))
2496 return __getcwd_chk_warn (__buf, __size, __builtin_object_size (__buf, 2 > 1));
2497 }
2498 return __getcwd_alias (__buf, __size);
2499}
2500extern char *__getwd_chk (char *__buf, size_t buflen)
2501 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 2)));
2502extern char *__getwd_warn (char *__buf) __asm__ ("" "getwd") __attribute__ ((__nothrow__ , __leaf__))
2503 __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("please use getcwd instead, as getwd " "doesn't specify buffer size")));
2504extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) __attribute__ ((__warn_unused_result__)) char *
2505__attribute__ ((__nothrow__ , __leaf__)) getwd (char *__buf)
2506{
2507 if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
2508 return __getwd_chk (__buf, __builtin_object_size (__buf, 2 > 1));
2509 return __getwd_warn (__buf);
2510}
2511extern size_t __confstr_chk (int __name, char *__buf, size_t __len,
2512 size_t __buflen) __attribute__ ((__nothrow__ , __leaf__))
2513 __attribute__ ((__access__ (__write_only__, 2, 3)));
2514extern size_t __confstr_alias (int __name, char *__buf, size_t __len) __asm__ ("" "confstr") __attribute__ ((__nothrow__ , __leaf__))
2515 __attribute__ ((__access__ (__write_only__, 2, 3)));
2516extern size_t __confstr_chk_warn (int __name, char *__buf, size_t __len, size_t __buflen) __asm__ ("" "__confstr_chk") __attribute__ ((__nothrow__ , __leaf__))
2517 __attribute__((__warning__ ("confstr called with bigger length than size of destination " "buffer")));
2518extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) size_t
2519__attribute__ ((__nothrow__ , __leaf__)) confstr (int __name, char *__buf, size_t __len)
2520{
2521 if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
2522 {
2523 if (!__builtin_constant_p (__len))
2524 return __confstr_chk (__name, __buf, __len, __builtin_object_size (__buf, 2 > 1));
2525 if (__builtin_object_size (__buf, 2 > 1) < __len)
2526 return __confstr_chk_warn (__name, __buf, __len, __builtin_object_size (__buf, 2 > 1));
2527 }
2528 return __confstr_alias (__name, __buf, __len);
2529}
2530extern int __getgroups_chk (int __size, __gid_t __list[], size_t __listlen)
2531 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 1)));
2532extern int __getgroups_alias (int __size, __gid_t __list[]) __asm__ ("" "getgroups") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 1)));
2533extern int __getgroups_chk_warn (int __size, __gid_t __list[], size_t __listlen) __asm__ ("" "__getgroups_chk") __attribute__ ((__nothrow__ , __leaf__))
2534 __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getgroups called with bigger group count than what " "can fit into destination buffer")));
2535extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
2536__attribute__ ((__nothrow__ , __leaf__)) getgroups (int __size, __gid_t __list[])
2537{
2538 if (__builtin_object_size (__list, 2 > 1) != (size_t) -1)
2539 {
2540 if (!__builtin_constant_p (__size) || __size < 0)
2541 return __getgroups_chk (__size, __list, __builtin_object_size (__list, 2 > 1));
2542 if (__size * sizeof (__gid_t) > __builtin_object_size (__list, 2 > 1))
2543 return __getgroups_chk_warn (__size, __list, __builtin_object_size (__list, 2 > 1));
2544 }
2545 return __getgroups_alias (__size, __list);
2546}
2547extern int __ttyname_r_chk (int __fd, char *__buf, size_t __buflen,
2548 size_t __nreal) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)))
2549 __attribute__ ((__access__ (__write_only__, 2, 3)));
2550extern int __ttyname_r_alias (int __fd, char *__buf, size_t __buflen) __asm__ ("" "ttyname_r") __attribute__ ((__nothrow__ , __leaf__))
2551 __attribute__ ((__nonnull__ (2)));
2552extern int __ttyname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__ttyname_r_chk") __attribute__ ((__nothrow__ , __leaf__))
2553 __attribute__ ((__nonnull__ (2))) __attribute__((__warning__ ("ttyname_r called with bigger buflen than " "size of destination buffer")));
2554extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
2555__attribute__ ((__nothrow__ , __leaf__)) ttyname_r (int __fd, char *__buf, size_t __buflen)
2556{
2557 if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
2558 {
2559 if (!__builtin_constant_p (__buflen))
2560 return __ttyname_r_chk (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1));
2561 if (__buflen > __builtin_object_size (__buf, 2 > 1))
2562 return __ttyname_r_chk_warn (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1));
2563 }
2564 return __ttyname_r_alias (__fd, __buf, __buflen);
2565}
2566extern int __getlogin_r_chk (char *__buf, size_t __buflen, size_t __nreal)
2567 __attribute__ ((__nonnull__ (1))) __attribute__ ((__access__ (__write_only__, 1, 2)));
2568extern int __getlogin_r_alias (char *__buf, size_t __buflen) __asm__ ("" "getlogin_r") __attribute__ ((__nonnull__ (1)));
2569extern int __getlogin_r_chk_warn (char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__getlogin_r_chk")
2570 __attribute__ ((__nonnull__ (1))) __attribute__((__warning__ ("getlogin_r called with bigger buflen than " "size of destination buffer")));
2571extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
2572getlogin_r (char *__buf, size_t __buflen)
2573{
2574 if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
2575 {
2576 if (!__builtin_constant_p (__buflen))
2577 return __getlogin_r_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1));
2578 if (__buflen > __builtin_object_size (__buf, 2 > 1))
2579 return __getlogin_r_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1));
2580 }
2581 return __getlogin_r_alias (__buf, __buflen);
2582}
2583extern int __gethostname_chk (char *__buf, size_t __buflen, size_t __nreal)
2584 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__access__ (__write_only__, 1, 2)));
2585extern int __gethostname_alias (char *__buf, size_t __buflen) __asm__ ("" "gethostname") __attribute__ ((__nothrow__ , __leaf__))
2586 __attribute__ ((__nonnull__ (1))) __attribute__ ((__access__ (__write_only__, 1, 2)));
2587extern int __gethostname_chk_warn (char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__gethostname_chk") __attribute__ ((__nothrow__ , __leaf__))
2588 __attribute__ ((__nonnull__ (1))) __attribute__((__warning__ ("gethostname called with bigger buflen than " "size of destination buffer")));
2589extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
2590__attribute__ ((__nothrow__ , __leaf__)) gethostname (char *__buf, size_t __buflen)
2591{
2592 if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
2593 {
2594 if (!__builtin_constant_p (__buflen))
2595 return __gethostname_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1));
2596 if (__buflen > __builtin_object_size (__buf, 2 > 1))
2597 return __gethostname_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1));
2598 }
2599 return __gethostname_alias (__buf, __buflen);
2600}
2601extern int __getdomainname_chk (char *__buf, size_t __buflen, size_t __nreal)
2602 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 2)));
2603extern int __getdomainname_alias (char *__buf, size_t __buflen) __asm__ ("" "getdomainname") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)))
2604 __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 2)));
2605extern int __getdomainname_chk_warn (char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__getdomainname_chk") __attribute__ ((__nothrow__ , __leaf__))
2606 __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getdomainname called with bigger " "buflen than size of destination " "buffer")));
2607extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
2608__attribute__ ((__nothrow__ , __leaf__)) getdomainname (char *__buf, size_t __buflen)
2609{
2610 if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
2611 {
2612 if (!__builtin_constant_p (__buflen))
2613 return __getdomainname_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1));
2614 if (__buflen > __builtin_object_size (__buf, 2 > 1))
2615 return __getdomainname_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1));
2616 }
2617 return __getdomainname_alias (__buf, __buflen);
2618}
2619extern __pid_t gettid (void) __attribute__ ((__nothrow__ , __leaf__));
2620
2621
2622typedef float float_t;
2623typedef double double_t;
2624enum
2625 {
2626 FP_INT_UPWARD =
2627 0,
2628 FP_INT_DOWNWARD =
2629 1,
2630 FP_INT_TOWARDZERO =
2631 2,
2632 FP_INT_TONEARESTFROMZERO =
2633 3,
2634 FP_INT_TONEAREST =
2635 4,
2636 };
2637extern int __fpclassify (double __value) __attribute__ ((__nothrow__ , __leaf__))
2638 __attribute__ ((__const__));
2639extern int __signbit (double __value) __attribute__ ((__nothrow__ , __leaf__))
2640 __attribute__ ((__const__));
2641extern int __isinf (double __value) __attribute__ ((__nothrow__ , __leaf__))
2642 __attribute__ ((__const__));
2643extern int __finite (double __value) __attribute__ ((__nothrow__ , __leaf__))
2644 __attribute__ ((__const__));
2645extern int __isnan (double __value) __attribute__ ((__nothrow__ , __leaf__))
2646 __attribute__ ((__const__));
2647extern int __iseqsig (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__));
2648extern int __issignaling (double __value) __attribute__ ((__nothrow__ , __leaf__))
2649 __attribute__ ((__const__));
2650extern double acos (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __acos (double __x) __attribute__ ((__nothrow__ , __leaf__));
2651extern double asin (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __asin (double __x) __attribute__ ((__nothrow__ , __leaf__));
2652extern double atan (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __atan (double __x) __attribute__ ((__nothrow__ , __leaf__));
2653extern double atan2 (double __y, double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __atan2 (double __y, double __x) __attribute__ ((__nothrow__ , __leaf__));
2654 extern double cos (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __cos (double __x) __attribute__ ((__nothrow__ , __leaf__));
2655 extern double sin (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __sin (double __x) __attribute__ ((__nothrow__ , __leaf__));
2656extern double tan (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __tan (double __x) __attribute__ ((__nothrow__ , __leaf__));
2657extern double cosh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __cosh (double __x) __attribute__ ((__nothrow__ , __leaf__));
2658extern double sinh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __sinh (double __x) __attribute__ ((__nothrow__ , __leaf__));
2659extern double tanh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __tanh (double __x) __attribute__ ((__nothrow__ , __leaf__));
2660 extern void sincos (double __x, double *__sinx, double *__cosx) __attribute__ ((__nothrow__ , __leaf__)); extern void __sincos (double __x, double *__sinx, double *__cosx) __attribute__ ((__nothrow__ , __leaf__));
2661extern double acosh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __acosh (double __x) __attribute__ ((__nothrow__ , __leaf__));
2662extern double asinh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __asinh (double __x) __attribute__ ((__nothrow__ , __leaf__));
2663extern double atanh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __atanh (double __x) __attribute__ ((__nothrow__ , __leaf__));
2664 extern double exp (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __exp (double __x) __attribute__ ((__nothrow__ , __leaf__));
2665extern double frexp (double __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern double __frexp (double __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__));
2666extern double ldexp (double __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern double __ldexp (double __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__));
2667 extern double log (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __log (double __x) __attribute__ ((__nothrow__ , __leaf__));
2668extern double log10 (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __log10 (double __x) __attribute__ ((__nothrow__ , __leaf__));
2669extern double modf (double __x, double *__iptr) __attribute__ ((__nothrow__ , __leaf__)); extern double __modf (double __x, double *__iptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
2670extern double exp10 (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __exp10 (double __x) __attribute__ ((__nothrow__ , __leaf__));
2671extern double expm1 (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __expm1 (double __x) __attribute__ ((__nothrow__ , __leaf__));
2672extern double log1p (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __log1p (double __x) __attribute__ ((__nothrow__ , __leaf__));
2673extern double logb (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __logb (double __x) __attribute__ ((__nothrow__ , __leaf__));
2674extern double exp2 (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __exp2 (double __x) __attribute__ ((__nothrow__ , __leaf__));
2675extern double log2 (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __log2 (double __x) __attribute__ ((__nothrow__ , __leaf__));
2676 extern double pow (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __pow (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__));
2677extern double sqrt (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __sqrt (double __x) __attribute__ ((__nothrow__ , __leaf__));
2678extern double hypot (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __hypot (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__));
2679extern double cbrt (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __cbrt (double __x) __attribute__ ((__nothrow__ , __leaf__));
2680extern double ceil (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __ceil (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2681extern double fabs (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __fabs (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2682extern double floor (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __floor (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2683extern double fmod (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __fmod (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__));
2684extern int isinf (double __value) __attribute__ ((__nothrow__ , __leaf__))
2685 __attribute__ ((__const__));
2686extern int finite (double __value) __attribute__ ((__nothrow__ , __leaf__))
2687 __attribute__ ((__const__));
2688extern double drem (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __drem (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__));
2689extern double significand (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __significand (double __x) __attribute__ ((__nothrow__ , __leaf__));
2690extern double copysign (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __copysign (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2691extern double nan (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)); extern double __nan (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__));
2692extern int isnan (double __value) __attribute__ ((__nothrow__ , __leaf__))
2693 __attribute__ ((__const__));
2694extern double j0 (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __j0 (double) __attribute__ ((__nothrow__ , __leaf__));
2695extern double j1 (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __j1 (double) __attribute__ ((__nothrow__ , __leaf__));
2696extern double jn (int, double) __attribute__ ((__nothrow__ , __leaf__)); extern double __jn (int, double) __attribute__ ((__nothrow__ , __leaf__));
2697extern double y0 (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __y0 (double) __attribute__ ((__nothrow__ , __leaf__));
2698extern double y1 (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __y1 (double) __attribute__ ((__nothrow__ , __leaf__));
2699extern double yn (int, double) __attribute__ ((__nothrow__ , __leaf__)); extern double __yn (int, double) __attribute__ ((__nothrow__ , __leaf__));
2700extern double erf (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __erf (double) __attribute__ ((__nothrow__ , __leaf__));
2701extern double erfc (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __erfc (double) __attribute__ ((__nothrow__ , __leaf__));
2702extern double lgamma (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __lgamma (double) __attribute__ ((__nothrow__ , __leaf__));
2703extern double tgamma (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __tgamma (double) __attribute__ ((__nothrow__ , __leaf__));
2704extern double gamma (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __gamma (double) __attribute__ ((__nothrow__ , __leaf__));
2705extern double lgamma_r (double, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern double __lgamma_r (double, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__));
2706extern double rint (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __rint (double __x) __attribute__ ((__nothrow__ , __leaf__));
2707extern double nextafter (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __nextafter (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__));
2708extern double nexttoward (double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __nexttoward (double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
2709extern double nextdown (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __nextdown (double __x) __attribute__ ((__nothrow__ , __leaf__));
2710extern double nextup (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __nextup (double __x) __attribute__ ((__nothrow__ , __leaf__));
2711extern double remainder (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __remainder (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__));
2712extern double scalbn (double __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern double __scalbn (double __x, int __n) __attribute__ ((__nothrow__ , __leaf__));
2713extern int ilogb (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern int __ilogb (double __x) __attribute__ ((__nothrow__ , __leaf__));
2714extern long int llogb (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __llogb (double __x) __attribute__ ((__nothrow__ , __leaf__));
2715extern double scalbln (double __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern double __scalbln (double __x, long int __n) __attribute__ ((__nothrow__ , __leaf__));
2716extern double nearbyint (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __nearbyint (double __x) __attribute__ ((__nothrow__ , __leaf__));
2717extern double round (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __round (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2718extern double trunc (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __trunc (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2719extern double remquo (double __x, double __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern double __remquo (double __x, double __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__));
2720extern long int lrint (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lrint (double __x) __attribute__ ((__nothrow__ , __leaf__));
2721__extension__
2722extern long long int llrint (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llrint (double __x) __attribute__ ((__nothrow__ , __leaf__));
2723extern long int lround (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lround (double __x) __attribute__ ((__nothrow__ , __leaf__));
2724__extension__
2725extern long long int llround (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llround (double __x) __attribute__ ((__nothrow__ , __leaf__));
2726extern double fdim (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __fdim (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__));
2727extern double fmax (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __fmax (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2728extern double fmin (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __fmin (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2729extern double fma (double __x, double __y, double __z) __attribute__ ((__nothrow__ , __leaf__)); extern double __fma (double __x, double __y, double __z) __attribute__ ((__nothrow__ , __leaf__));
2730extern double roundeven (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __roundeven (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2731extern __intmax_t fromfp (double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfp (double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
2732extern __uintmax_t ufromfp (double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfp (double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
2733extern __intmax_t fromfpx (double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpx (double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
2734extern __uintmax_t ufromfpx (double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpx (double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
2735extern double fmaxmag (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __fmaxmag (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2736extern double fminmag (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __fminmag (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2737extern int canonicalize (double *__cx, const double *__x) __attribute__ ((__nothrow__ , __leaf__));
2738extern int totalorder (const double *__x, const double *__y) __attribute__ ((__nothrow__ , __leaf__))
2739 __attribute__ ((__pure__));
2740extern int totalordermag (const double *__x, const double *__y) __attribute__ ((__nothrow__ , __leaf__))
2741 __attribute__ ((__pure__));
2742extern double getpayload (const double *__x) __attribute__ ((__nothrow__ , __leaf__)); extern double __getpayload (const double *__x) __attribute__ ((__nothrow__ , __leaf__));
2743extern int setpayload (double *__x, double __payload) __attribute__ ((__nothrow__ , __leaf__));
2744extern int setpayloadsig (double *__x, double __payload) __attribute__ ((__nothrow__ , __leaf__));
2745extern double scalb (double __x, double __n) __attribute__ ((__nothrow__ , __leaf__)); extern double __scalb (double __x, double __n) __attribute__ ((__nothrow__ , __leaf__));
2746extern int __fpclassifyf (float __value) __attribute__ ((__nothrow__ , __leaf__))
2747 __attribute__ ((__const__));
2748extern int __signbitf (float __value) __attribute__ ((__nothrow__ , __leaf__))
2749 __attribute__ ((__const__));
2750extern int __isinff (float __value) __attribute__ ((__nothrow__ , __leaf__))
2751 __attribute__ ((__const__));
2752extern int __finitef (float __value) __attribute__ ((__nothrow__ , __leaf__))
2753 __attribute__ ((__const__));
2754extern int __isnanf (float __value) __attribute__ ((__nothrow__ , __leaf__))
2755 __attribute__ ((__const__));
2756extern int __iseqsigf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__));
2757extern int __issignalingf (float __value) __attribute__ ((__nothrow__ , __leaf__))
2758 __attribute__ ((__const__));
2759extern float acosf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __acosf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2760extern float asinf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __asinf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2761extern float atanf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __atanf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2762extern float atan2f (float __y, float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __atan2f (float __y, float __x) __attribute__ ((__nothrow__ , __leaf__));
2763 extern float cosf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __cosf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2764 extern float sinf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __sinf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2765extern float tanf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __tanf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2766extern float coshf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __coshf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2767extern float sinhf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __sinhf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2768extern float tanhf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __tanhf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2769 extern void sincosf (float __x, float *__sinx, float *__cosx) __attribute__ ((__nothrow__ , __leaf__)); extern void __sincosf (float __x, float *__sinx, float *__cosx) __attribute__ ((__nothrow__ , __leaf__));
2770extern float acoshf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __acoshf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2771extern float asinhf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __asinhf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2772extern float atanhf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __atanhf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2773 extern float expf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __expf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2774extern float frexpf (float __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern float __frexpf (float __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__));
2775extern float ldexpf (float __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern float __ldexpf (float __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__));
2776 extern float logf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __logf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2777extern float log10f (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __log10f (float __x) __attribute__ ((__nothrow__ , __leaf__));
2778extern float modff (float __x, float *__iptr) __attribute__ ((__nothrow__ , __leaf__)); extern float __modff (float __x, float *__iptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
2779extern float exp10f (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __exp10f (float __x) __attribute__ ((__nothrow__ , __leaf__));
2780extern float expm1f (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __expm1f (float __x) __attribute__ ((__nothrow__ , __leaf__));
2781extern float log1pf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __log1pf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2782extern float logbf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __logbf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2783extern float exp2f (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __exp2f (float __x) __attribute__ ((__nothrow__ , __leaf__));
2784extern float log2f (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __log2f (float __x) __attribute__ ((__nothrow__ , __leaf__));
2785 extern float powf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __powf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__));
2786extern float sqrtf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __sqrtf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2787extern float hypotf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __hypotf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__));
2788extern float cbrtf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __cbrtf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2789extern float ceilf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __ceilf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2790extern float fabsf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __fabsf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2791extern float floorf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __floorf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2792extern float fmodf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __fmodf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__));
2793extern int isinff (float __value) __attribute__ ((__nothrow__ , __leaf__))
2794 __attribute__ ((__const__));
2795extern int finitef (float __value) __attribute__ ((__nothrow__ , __leaf__))
2796 __attribute__ ((__const__));
2797extern float dremf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __dremf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__));
2798extern float significandf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __significandf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2799extern float copysignf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __copysignf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2800extern float nanf (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)); extern float __nanf (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__));
2801extern int isnanf (float __value) __attribute__ ((__nothrow__ , __leaf__))
2802 __attribute__ ((__const__));
2803extern float j0f (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __j0f (float) __attribute__ ((__nothrow__ , __leaf__));
2804extern float j1f (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __j1f (float) __attribute__ ((__nothrow__ , __leaf__));
2805extern float jnf (int, float) __attribute__ ((__nothrow__ , __leaf__)); extern float __jnf (int, float) __attribute__ ((__nothrow__ , __leaf__));
2806extern float y0f (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __y0f (float) __attribute__ ((__nothrow__ , __leaf__));
2807extern float y1f (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __y1f (float) __attribute__ ((__nothrow__ , __leaf__));
2808extern float ynf (int, float) __attribute__ ((__nothrow__ , __leaf__)); extern float __ynf (int, float) __attribute__ ((__nothrow__ , __leaf__));
2809extern float erff (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __erff (float) __attribute__ ((__nothrow__ , __leaf__));
2810extern float erfcf (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __erfcf (float) __attribute__ ((__nothrow__ , __leaf__));
2811extern float lgammaf (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __lgammaf (float) __attribute__ ((__nothrow__ , __leaf__));
2812extern float tgammaf (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __tgammaf (float) __attribute__ ((__nothrow__ , __leaf__));
2813extern float gammaf (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __gammaf (float) __attribute__ ((__nothrow__ , __leaf__));
2814extern float lgammaf_r (float, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern float __lgammaf_r (float, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__));
2815extern float rintf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __rintf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2816extern float nextafterf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __nextafterf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__));
2817extern float nexttowardf (float __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __nexttowardf (float __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
2818extern float nextdownf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __nextdownf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2819extern float nextupf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __nextupf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2820extern float remainderf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __remainderf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__));
2821extern float scalbnf (float __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern float __scalbnf (float __x, int __n) __attribute__ ((__nothrow__ , __leaf__));
2822extern int ilogbf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern int __ilogbf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2823extern long int llogbf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __llogbf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2824extern float scalblnf (float __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern float __scalblnf (float __x, long int __n) __attribute__ ((__nothrow__ , __leaf__));
2825extern float nearbyintf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __nearbyintf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2826extern float roundf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __roundf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2827extern float truncf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __truncf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2828extern float remquof (float __x, float __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern float __remquof (float __x, float __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__));
2829extern long int lrintf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lrintf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2830__extension__
2831extern long long int llrintf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llrintf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2832extern long int lroundf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lroundf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2833__extension__
2834extern long long int llroundf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llroundf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2835extern float fdimf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __fdimf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__));
2836extern float fmaxf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __fmaxf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2837extern float fminf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __fminf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2838extern float fmaf (float __x, float __y, float __z) __attribute__ ((__nothrow__ , __leaf__)); extern float __fmaf (float __x, float __y, float __z) __attribute__ ((__nothrow__ , __leaf__));
2839extern float roundevenf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __roundevenf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2840extern __intmax_t fromfpf (float __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpf (float __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
2841extern __uintmax_t ufromfpf (float __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpf (float __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
2842extern __intmax_t fromfpxf (float __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpxf (float __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
2843extern __uintmax_t ufromfpxf (float __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpxf (float __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
2844extern float fmaxmagf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __fmaxmagf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2845extern float fminmagf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __fminmagf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2846extern int canonicalizef (float *__cx, const float *__x) __attribute__ ((__nothrow__ , __leaf__));
2847extern int totalorderf (const float *__x, const float *__y) __attribute__ ((__nothrow__ , __leaf__))
2848 __attribute__ ((__pure__));
2849extern int totalordermagf (const float *__x, const float *__y) __attribute__ ((__nothrow__ , __leaf__))
2850 __attribute__ ((__pure__));
2851extern float getpayloadf (const float *__x) __attribute__ ((__nothrow__ , __leaf__)); extern float __getpayloadf (const float *__x) __attribute__ ((__nothrow__ , __leaf__));
2852extern int setpayloadf (float *__x, float __payload) __attribute__ ((__nothrow__ , __leaf__));
2853extern int setpayloadsigf (float *__x, float __payload) __attribute__ ((__nothrow__ , __leaf__));
2854extern float scalbf (float __x, float __n) __attribute__ ((__nothrow__ , __leaf__)); extern float __scalbf (float __x, float __n) __attribute__ ((__nothrow__ , __leaf__));
2855extern int __fpclassifyl (long double __value) __attribute__ ((__nothrow__ , __leaf__))
2856 __attribute__ ((__const__));
2857extern int __signbitl (long double __value) __attribute__ ((__nothrow__ , __leaf__))
2858 __attribute__ ((__const__));
2859extern int __isinfl (long double __value) __attribute__ ((__nothrow__ , __leaf__))
2860 __attribute__ ((__const__));
2861extern int __finitel (long double __value) __attribute__ ((__nothrow__ , __leaf__))
2862 __attribute__ ((__const__));
2863extern int __isnanl (long double __value) __attribute__ ((__nothrow__ , __leaf__))
2864 __attribute__ ((__const__));
2865extern int __iseqsigl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
2866extern int __issignalingl (long double __value) __attribute__ ((__nothrow__ , __leaf__))
2867 __attribute__ ((__const__));
2868extern long double acosl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __acosl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2869extern long double asinl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __asinl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2870extern long double atanl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __atanl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2871extern long double atan2l (long double __y, long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __atan2l (long double __y, long double __x) __attribute__ ((__nothrow__ , __leaf__));
2872 extern long double cosl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __cosl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2873 extern long double sinl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __sinl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2874extern long double tanl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __tanl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2875extern long double coshl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __coshl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2876extern long double sinhl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __sinhl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2877extern long double tanhl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __tanhl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2878 extern void sincosl (long double __x, long double *__sinx, long double *__cosx) __attribute__ ((__nothrow__ , __leaf__)); extern void __sincosl (long double __x, long double *__sinx, long double *__cosx) __attribute__ ((__nothrow__ , __leaf__));
2879extern long double acoshl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __acoshl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2880extern long double asinhl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __asinhl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2881extern long double atanhl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __atanhl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2882 extern long double expl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __expl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2883extern long double frexpl (long double __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern long double __frexpl (long double __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__));
2884extern long double ldexpl (long double __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern long double __ldexpl (long double __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__));
2885 extern long double logl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __logl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2886extern long double log10l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __log10l (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2887extern long double modfl (long double __x, long double *__iptr) __attribute__ ((__nothrow__ , __leaf__)); extern long double __modfl (long double __x, long double *__iptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
2888extern long double exp10l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __exp10l (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2889extern long double expm1l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __expm1l (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2890extern long double log1pl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __log1pl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2891extern long double logbl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __logbl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2892extern long double exp2l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __exp2l (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2893extern long double log2l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __log2l (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2894 extern long double powl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __powl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
2895extern long double sqrtl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __sqrtl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2896extern long double hypotl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __hypotl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
2897extern long double cbrtl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __cbrtl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2898extern long double ceill (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __ceill (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2899extern long double fabsl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __fabsl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2900extern long double floorl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __floorl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2901extern long double fmodl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __fmodl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
2902extern int isinfl (long double __value) __attribute__ ((__nothrow__ , __leaf__))
2903 __attribute__ ((__const__));
2904extern int finitel (long double __value) __attribute__ ((__nothrow__ , __leaf__))
2905 __attribute__ ((__const__));
2906extern long double dreml (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __dreml (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
2907extern long double significandl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __significandl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2908extern long double copysignl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __copysignl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2909extern long double nanl (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)); extern long double __nanl (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__));
2910extern int isnanl (long double __value) __attribute__ ((__nothrow__ , __leaf__))
2911 __attribute__ ((__const__));
2912extern long double j0l (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __j0l (long double) __attribute__ ((__nothrow__ , __leaf__));
2913extern long double j1l (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __j1l (long double) __attribute__ ((__nothrow__ , __leaf__));
2914extern long double jnl (int, long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __jnl (int, long double) __attribute__ ((__nothrow__ , __leaf__));
2915extern long double y0l (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __y0l (long double) __attribute__ ((__nothrow__ , __leaf__));
2916extern long double y1l (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __y1l (long double) __attribute__ ((__nothrow__ , __leaf__));
2917extern long double ynl (int, long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __ynl (int, long double) __attribute__ ((__nothrow__ , __leaf__));
2918extern long double erfl (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __erfl (long double) __attribute__ ((__nothrow__ , __leaf__));
2919extern long double erfcl (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __erfcl (long double) __attribute__ ((__nothrow__ , __leaf__));
2920extern long double lgammal (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __lgammal (long double) __attribute__ ((__nothrow__ , __leaf__));
2921extern long double tgammal (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __tgammal (long double) __attribute__ ((__nothrow__ , __leaf__));
2922extern long double gammal (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __gammal (long double) __attribute__ ((__nothrow__ , __leaf__));
2923extern long double lgammal_r (long double, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern long double __lgammal_r (long double, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__));
2924extern long double rintl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __rintl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2925extern long double nextafterl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __nextafterl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
2926extern long double nexttowardl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __nexttowardl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
2927extern long double nextdownl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __nextdownl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2928extern long double nextupl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __nextupl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2929extern long double remainderl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __remainderl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
2930extern long double scalbnl (long double __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern long double __scalbnl (long double __x, int __n) __attribute__ ((__nothrow__ , __leaf__));
2931extern int ilogbl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern int __ilogbl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2932extern long int llogbl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __llogbl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2933extern long double scalblnl (long double __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern long double __scalblnl (long double __x, long int __n) __attribute__ ((__nothrow__ , __leaf__));
2934extern long double nearbyintl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __nearbyintl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2935extern long double roundl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __roundl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2936extern long double truncl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __truncl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2937extern long double remquol (long double __x, long double __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern long double __remquol (long double __x, long double __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__));
2938extern long int lrintl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lrintl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2939__extension__
2940extern long long int llrintl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llrintl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2941extern long int lroundl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lroundl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2942__extension__
2943extern long long int llroundl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llroundl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2944extern long double fdiml (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __fdiml (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
2945extern long double fmaxl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __fmaxl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2946extern long double fminl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __fminl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2947extern long double fmal (long double __x, long double __y, long double __z) __attribute__ ((__nothrow__ , __leaf__)); extern long double __fmal (long double __x, long double __y, long double __z) __attribute__ ((__nothrow__ , __leaf__));
2948extern long double roundevenl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __roundevenl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2949extern __intmax_t fromfpl (long double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpl (long double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
2950extern __uintmax_t ufromfpl (long double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpl (long double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
2951extern __intmax_t fromfpxl (long double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpxl (long double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
2952extern __uintmax_t ufromfpxl (long double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpxl (long double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
2953extern long double fmaxmagl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __fmaxmagl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2954extern long double fminmagl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __fminmagl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2955extern int canonicalizel (long double *__cx, const long double *__x) __attribute__ ((__nothrow__ , __leaf__));
2956extern int totalorderl (const long double *__x, const long double *__y) __attribute__ ((__nothrow__ , __leaf__))
2957 __attribute__ ((__pure__));
2958extern int totalordermagl (const long double *__x, const long double *__y) __attribute__ ((__nothrow__ , __leaf__))
2959 __attribute__ ((__pure__));
2960extern long double getpayloadl (const long double *__x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __getpayloadl (const long double *__x) __attribute__ ((__nothrow__ , __leaf__));
2961extern int setpayloadl (long double *__x, long double __payload) __attribute__ ((__nothrow__ , __leaf__));
2962extern int setpayloadsigl (long double *__x, long double __payload) __attribute__ ((__nothrow__ , __leaf__));
2963extern long double scalbl (long double __x, long double __n) __attribute__ ((__nothrow__ , __leaf__)); extern long double __scalbl (long double __x, long double __n) __attribute__ ((__nothrow__ , __leaf__));
2964extern _Float32 acosf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __acosf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2965extern _Float32 asinf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __asinf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2966extern _Float32 atanf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __atanf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2967extern _Float32 atan2f32 (_Float32 __y, _Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __atan2f32 (_Float32 __y, _Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2968 extern _Float32 cosf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __cosf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2969 extern _Float32 sinf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __sinf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2970extern _Float32 tanf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __tanf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2971extern _Float32 coshf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __coshf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2972extern _Float32 sinhf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __sinhf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2973extern _Float32 tanhf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __tanhf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2974 extern void sincosf32 (_Float32 __x, _Float32 *__sinx, _Float32 *__cosx) __attribute__ ((__nothrow__ , __leaf__)); extern void __sincosf32 (_Float32 __x, _Float32 *__sinx, _Float32 *__cosx) __attribute__ ((__nothrow__ , __leaf__));
2975extern _Float32 acoshf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __acoshf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2976extern _Float32 asinhf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __asinhf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2977extern _Float32 atanhf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __atanhf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2978 extern _Float32 expf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __expf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2979extern _Float32 frexpf32 (_Float32 __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __frexpf32 (_Float32 __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__));
2980extern _Float32 ldexpf32 (_Float32 __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __ldexpf32 (_Float32 __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__));
2981 extern _Float32 logf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __logf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2982extern _Float32 log10f32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __log10f32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2983extern _Float32 modff32 (_Float32 __x, _Float32 *__iptr) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __modff32 (_Float32 __x, _Float32 *__iptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
2984extern _Float32 exp10f32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __exp10f32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2985extern _Float32 expm1f32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __expm1f32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2986extern _Float32 log1pf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __log1pf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2987extern _Float32 logbf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __logbf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2988extern _Float32 exp2f32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __exp2f32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2989extern _Float32 log2f32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __log2f32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2990 extern _Float32 powf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __powf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__));
2991extern _Float32 sqrtf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __sqrtf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2992extern _Float32 hypotf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __hypotf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__));
2993extern _Float32 cbrtf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __cbrtf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2994extern _Float32 ceilf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __ceilf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2995extern _Float32 fabsf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __fabsf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2996extern _Float32 floorf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __floorf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2997extern _Float32 fmodf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __fmodf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__));
2998extern _Float32 copysignf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __copysignf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2999extern _Float32 nanf32 (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __nanf32 (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__));
3000extern _Float32 j0f32 (_Float32) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __j0f32 (_Float32) __attribute__ ((__nothrow__ , __leaf__));
3001extern _Float32 j1f32 (_Float32) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __j1f32 (_Float32) __attribute__ ((__nothrow__ , __leaf__));
3002extern _Float32 jnf32 (int, _Float32) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __jnf32 (int, _Float32) __attribute__ ((__nothrow__ , __leaf__));
3003extern _Float32 y0f32 (_Float32) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __y0f32 (_Float32) __attribute__ ((__nothrow__ , __leaf__));
3004extern _Float32 y1f32 (_Float32) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __y1f32 (_Float32) __attribute__ ((__nothrow__ , __leaf__));
3005extern _Float32 ynf32 (int, _Float32) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __ynf32 (int, _Float32) __attribute__ ((__nothrow__ , __leaf__));
3006extern _Float32 erff32 (_Float32) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __erff32 (_Float32) __attribute__ ((__nothrow__ , __leaf__));
3007extern _Float32 erfcf32 (_Float32) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __erfcf32 (_Float32) __attribute__ ((__nothrow__ , __leaf__));
3008extern _Float32 lgammaf32 (_Float32) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __lgammaf32 (_Float32) __attribute__ ((__nothrow__ , __leaf__));
3009extern _Float32 tgammaf32 (_Float32) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __tgammaf32 (_Float32) __attribute__ ((__nothrow__ , __leaf__));
3010extern _Float32 lgammaf32_r (_Float32, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __lgammaf32_r (_Float32, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__));
3011extern _Float32 rintf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __rintf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
3012extern _Float32 nextafterf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __nextafterf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__));
3013extern _Float32 nextdownf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __nextdownf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
3014extern _Float32 nextupf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __nextupf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
3015extern _Float32 remainderf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __remainderf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__));
3016extern _Float32 scalbnf32 (_Float32 __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __scalbnf32 (_Float32 __x, int __n) __attribute__ ((__nothrow__ , __leaf__));
3017extern int ilogbf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern int __ilogbf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
3018extern long int llogbf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __llogbf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
3019extern _Float32 scalblnf32 (_Float32 __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __scalblnf32 (_Float32 __x, long int __n) __attribute__ ((__nothrow__ , __leaf__));
3020extern _Float32 nearbyintf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __nearbyintf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
3021extern _Float32 roundf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __roundf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3022extern _Float32 truncf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __truncf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3023extern _Float32 remquof32 (_Float32 __x, _Float32 __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __remquof32 (_Float32 __x, _Float32 __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__));
3024extern long int lrintf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lrintf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
3025__extension__
3026extern long long int llrintf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llrintf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
3027extern long int lroundf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lroundf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
3028__extension__
3029extern long long int llroundf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llroundf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
3030extern _Float32 fdimf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __fdimf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__));
3031extern _Float32 fmaxf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __fmaxf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3032extern _Float32 fminf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __fminf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3033extern _Float32 fmaf32 (_Float32 __x, _Float32 __y, _Float32 __z) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __fmaf32 (_Float32 __x, _Float32 __y, _Float32 __z) __attribute__ ((__nothrow__ , __leaf__));
3034extern _Float32 roundevenf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __roundevenf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3035extern __intmax_t fromfpf32 (_Float32 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpf32 (_Float32 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3036extern __uintmax_t ufromfpf32 (_Float32 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpf32 (_Float32 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3037extern __intmax_t fromfpxf32 (_Float32 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpxf32 (_Float32 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3038extern __uintmax_t ufromfpxf32 (_Float32 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpxf32 (_Float32 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3039extern _Float32 fmaxmagf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __fmaxmagf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3040extern _Float32 fminmagf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __fminmagf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3041extern int canonicalizef32 (_Float32 *__cx, const _Float32 *__x) __attribute__ ((__nothrow__ , __leaf__));
3042extern int totalorderf32 (const _Float32 *__x, const _Float32 *__y) __attribute__ ((__nothrow__ , __leaf__))
3043 __attribute__ ((__pure__));
3044extern int totalordermagf32 (const _Float32 *__x, const _Float32 *__y) __attribute__ ((__nothrow__ , __leaf__))
3045 __attribute__ ((__pure__));
3046extern _Float32 getpayloadf32 (const _Float32 *__x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __getpayloadf32 (const _Float32 *__x) __attribute__ ((__nothrow__ , __leaf__));
3047extern int setpayloadf32 (_Float32 *__x, _Float32 __payload) __attribute__ ((__nothrow__ , __leaf__));
3048extern int setpayloadsigf32 (_Float32 *__x, _Float32 __payload) __attribute__ ((__nothrow__ , __leaf__));
3049extern _Float64 acosf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __acosf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3050extern _Float64 asinf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __asinf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3051extern _Float64 atanf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __atanf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3052extern _Float64 atan2f64 (_Float64 __y, _Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __atan2f64 (_Float64 __y, _Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3053 extern _Float64 cosf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __cosf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3054 extern _Float64 sinf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __sinf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3055extern _Float64 tanf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __tanf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3056extern _Float64 coshf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __coshf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3057extern _Float64 sinhf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __sinhf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3058extern _Float64 tanhf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __tanhf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3059 extern void sincosf64 (_Float64 __x, _Float64 *__sinx, _Float64 *__cosx) __attribute__ ((__nothrow__ , __leaf__)); extern void __sincosf64 (_Float64 __x, _Float64 *__sinx, _Float64 *__cosx) __attribute__ ((__nothrow__ , __leaf__));
3060extern _Float64 acoshf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __acoshf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3061extern _Float64 asinhf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __asinhf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3062extern _Float64 atanhf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __atanhf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3063 extern _Float64 expf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __expf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3064extern _Float64 frexpf64 (_Float64 __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __frexpf64 (_Float64 __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__));
3065extern _Float64 ldexpf64 (_Float64 __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __ldexpf64 (_Float64 __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__));
3066 extern _Float64 logf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __logf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3067extern _Float64 log10f64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __log10f64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3068extern _Float64 modff64 (_Float64 __x, _Float64 *__iptr) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __modff64 (_Float64 __x, _Float64 *__iptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
3069extern _Float64 exp10f64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __exp10f64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3070extern _Float64 expm1f64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __expm1f64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3071extern _Float64 log1pf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __log1pf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3072extern _Float64 logbf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __logbf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3073extern _Float64 exp2f64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __exp2f64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3074extern _Float64 log2f64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __log2f64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3075 extern _Float64 powf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __powf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__));
3076extern _Float64 sqrtf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __sqrtf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3077extern _Float64 hypotf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __hypotf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__));
3078extern _Float64 cbrtf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __cbrtf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3079extern _Float64 ceilf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __ceilf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3080extern _Float64 fabsf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __fabsf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3081extern _Float64 floorf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __floorf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3082extern _Float64 fmodf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __fmodf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__));
3083extern _Float64 copysignf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __copysignf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3084extern _Float64 nanf64 (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __nanf64 (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__));
3085extern _Float64 j0f64 (_Float64) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __j0f64 (_Float64) __attribute__ ((__nothrow__ , __leaf__));
3086extern _Float64 j1f64 (_Float64) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __j1f64 (_Float64) __attribute__ ((__nothrow__ , __leaf__));
3087extern _Float64 jnf64 (int, _Float64) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __jnf64 (int, _Float64) __attribute__ ((__nothrow__ , __leaf__));
3088extern _Float64 y0f64 (_Float64) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __y0f64 (_Float64) __attribute__ ((__nothrow__ , __leaf__));
3089extern _Float64 y1f64 (_Float64) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __y1f64 (_Float64) __attribute__ ((__nothrow__ , __leaf__));
3090extern _Float64 ynf64 (int, _Float64) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __ynf64 (int, _Float64) __attribute__ ((__nothrow__ , __leaf__));
3091extern _Float64 erff64 (_Float64) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __erff64 (_Float64) __attribute__ ((__nothrow__ , __leaf__));
3092extern _Float64 erfcf64 (_Float64) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __erfcf64 (_Float64) __attribute__ ((__nothrow__ , __leaf__));
3093extern _Float64 lgammaf64 (_Float64) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __lgammaf64 (_Float64) __attribute__ ((__nothrow__ , __leaf__));
3094extern _Float64 tgammaf64 (_Float64) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __tgammaf64 (_Float64) __attribute__ ((__nothrow__ , __leaf__));
3095extern _Float64 lgammaf64_r (_Float64, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __lgammaf64_r (_Float64, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__));
3096extern _Float64 rintf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __rintf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3097extern _Float64 nextafterf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __nextafterf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__));
3098extern _Float64 nextdownf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __nextdownf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3099extern _Float64 nextupf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __nextupf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3100extern _Float64 remainderf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __remainderf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__));
3101extern _Float64 scalbnf64 (_Float64 __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __scalbnf64 (_Float64 __x, int __n) __attribute__ ((__nothrow__ , __leaf__));
3102extern int ilogbf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern int __ilogbf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3103extern long int llogbf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __llogbf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3104extern _Float64 scalblnf64 (_Float64 __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __scalblnf64 (_Float64 __x, long int __n) __attribute__ ((__nothrow__ , __leaf__));
3105extern _Float64 nearbyintf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __nearbyintf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3106extern _Float64 roundf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __roundf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3107extern _Float64 truncf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __truncf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3108extern _Float64 remquof64 (_Float64 __x, _Float64 __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __remquof64 (_Float64 __x, _Float64 __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__));
3109extern long int lrintf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lrintf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3110__extension__
3111extern long long int llrintf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llrintf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3112extern long int lroundf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lroundf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3113__extension__
3114extern long long int llroundf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llroundf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3115extern _Float64 fdimf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __fdimf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__));
3116extern _Float64 fmaxf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __fmaxf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3117extern _Float64 fminf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __fminf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3118extern _Float64 fmaf64 (_Float64 __x, _Float64 __y, _Float64 __z) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __fmaf64 (_Float64 __x, _Float64 __y, _Float64 __z) __attribute__ ((__nothrow__ , __leaf__));
3119extern _Float64 roundevenf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __roundevenf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3120extern __intmax_t fromfpf64 (_Float64 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpf64 (_Float64 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3121extern __uintmax_t ufromfpf64 (_Float64 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpf64 (_Float64 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3122extern __intmax_t fromfpxf64 (_Float64 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpxf64 (_Float64 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3123extern __uintmax_t ufromfpxf64 (_Float64 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpxf64 (_Float64 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3124extern _Float64 fmaxmagf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __fmaxmagf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3125extern _Float64 fminmagf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __fminmagf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3126extern int canonicalizef64 (_Float64 *__cx, const _Float64 *__x) __attribute__ ((__nothrow__ , __leaf__));
3127extern int totalorderf64 (const _Float64 *__x, const _Float64 *__y) __attribute__ ((__nothrow__ , __leaf__))
3128 __attribute__ ((__pure__));
3129extern int totalordermagf64 (const _Float64 *__x, const _Float64 *__y) __attribute__ ((__nothrow__ , __leaf__))
3130 __attribute__ ((__pure__));
3131extern _Float64 getpayloadf64 (const _Float64 *__x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __getpayloadf64 (const _Float64 *__x) __attribute__ ((__nothrow__ , __leaf__));
3132extern int setpayloadf64 (_Float64 *__x, _Float64 __payload) __attribute__ ((__nothrow__ , __leaf__));
3133extern int setpayloadsigf64 (_Float64 *__x, _Float64 __payload) __attribute__ ((__nothrow__ , __leaf__));
3134extern int __fpclassifyf128 (_Float128 __value) __attribute__ ((__nothrow__ , __leaf__))
3135 __attribute__ ((__const__));
3136extern int __signbitf128 (_Float128 __value) __attribute__ ((__nothrow__ , __leaf__))
3137 __attribute__ ((__const__));
3138extern int __isinff128 (_Float128 __value) __attribute__ ((__nothrow__ , __leaf__))
3139 __attribute__ ((__const__));
3140extern int __finitef128 (_Float128 __value) __attribute__ ((__nothrow__ , __leaf__))
3141 __attribute__ ((__const__));
3142extern int __isnanf128 (_Float128 __value) __attribute__ ((__nothrow__ , __leaf__))
3143 __attribute__ ((__const__));
3144extern int __iseqsigf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3145extern int __issignalingf128 (_Float128 __value) __attribute__ ((__nothrow__ , __leaf__))
3146 __attribute__ ((__const__));
3147extern _Float128 acosf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __acosf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3148extern _Float128 asinf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __asinf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3149extern _Float128 atanf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __atanf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3150extern _Float128 atan2f128 (_Float128 __y, _Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __atan2f128 (_Float128 __y, _Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3151 extern _Float128 cosf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __cosf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3152 extern _Float128 sinf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __sinf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3153extern _Float128 tanf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __tanf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3154extern _Float128 coshf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __coshf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3155extern _Float128 sinhf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __sinhf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3156extern _Float128 tanhf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __tanhf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3157 extern void sincosf128 (_Float128 __x, _Float128 *__sinx, _Float128 *__cosx) __attribute__ ((__nothrow__ , __leaf__)); extern void __sincosf128 (_Float128 __x, _Float128 *__sinx, _Float128 *__cosx) __attribute__ ((__nothrow__ , __leaf__));
3158extern _Float128 acoshf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __acoshf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3159extern _Float128 asinhf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __asinhf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3160extern _Float128 atanhf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __atanhf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3161 extern _Float128 expf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __expf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3162extern _Float128 frexpf128 (_Float128 __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __frexpf128 (_Float128 __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__));
3163extern _Float128 ldexpf128 (_Float128 __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __ldexpf128 (_Float128 __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__));
3164 extern _Float128 logf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __logf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3165extern _Float128 log10f128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __log10f128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3166extern _Float128 modff128 (_Float128 __x, _Float128 *__iptr) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __modff128 (_Float128 __x, _Float128 *__iptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
3167extern _Float128 exp10f128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __exp10f128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3168extern _Float128 expm1f128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __expm1f128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3169extern _Float128 log1pf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __log1pf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3170extern _Float128 logbf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __logbf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3171extern _Float128 exp2f128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __exp2f128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3172extern _Float128 log2f128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __log2f128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3173 extern _Float128 powf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __powf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3174extern _Float128 sqrtf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __sqrtf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3175extern _Float128 hypotf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __hypotf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3176extern _Float128 cbrtf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __cbrtf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3177extern _Float128 ceilf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __ceilf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3178extern _Float128 fabsf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __fabsf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3179extern _Float128 floorf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __floorf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3180extern _Float128 fmodf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __fmodf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3181extern _Float128 copysignf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __copysignf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3182extern _Float128 nanf128 (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __nanf128 (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__));
3183extern _Float128 j0f128 (_Float128) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __j0f128 (_Float128) __attribute__ ((__nothrow__ , __leaf__));
3184extern _Float128 j1f128 (_Float128) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __j1f128 (_Float128) __attribute__ ((__nothrow__ , __leaf__));
3185extern _Float128 jnf128 (int, _Float128) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __jnf128 (int, _Float128) __attribute__ ((__nothrow__ , __leaf__));
3186extern _Float128 y0f128 (_Float128) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __y0f128 (_Float128) __attribute__ ((__nothrow__ , __leaf__));
3187extern _Float128 y1f128 (_Float128) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __y1f128 (_Float128) __attribute__ ((__nothrow__ , __leaf__));
3188extern _Float128 ynf128 (int, _Float128) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __ynf128 (int, _Float128) __attribute__ ((__nothrow__ , __leaf__));
3189extern _Float128 erff128 (_Float128) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __erff128 (_Float128) __attribute__ ((__nothrow__ , __leaf__));
3190extern _Float128 erfcf128 (_Float128) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __erfcf128 (_Float128) __attribute__ ((__nothrow__ , __leaf__));
3191extern _Float128 lgammaf128 (_Float128) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __lgammaf128 (_Float128) __attribute__ ((__nothrow__ , __leaf__));
3192extern _Float128 tgammaf128 (_Float128) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __tgammaf128 (_Float128) __attribute__ ((__nothrow__ , __leaf__));
3193extern _Float128 lgammaf128_r (_Float128, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __lgammaf128_r (_Float128, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__));
3194extern _Float128 rintf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __rintf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3195extern _Float128 nextafterf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __nextafterf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3196extern _Float128 nextdownf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __nextdownf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3197extern _Float128 nextupf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __nextupf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3198extern _Float128 remainderf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __remainderf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3199extern _Float128 scalbnf128 (_Float128 __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __scalbnf128 (_Float128 __x, int __n) __attribute__ ((__nothrow__ , __leaf__));
3200extern int ilogbf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern int __ilogbf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3201extern long int llogbf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __llogbf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3202extern _Float128 scalblnf128 (_Float128 __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __scalblnf128 (_Float128 __x, long int __n) __attribute__ ((__nothrow__ , __leaf__));
3203extern _Float128 nearbyintf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __nearbyintf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3204extern _Float128 roundf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __roundf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3205extern _Float128 truncf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __truncf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3206extern _Float128 remquof128 (_Float128 __x, _Float128 __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __remquof128 (_Float128 __x, _Float128 __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__));
3207extern long int lrintf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lrintf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3208__extension__
3209extern long long int llrintf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llrintf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3210extern long int lroundf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lroundf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3211__extension__
3212extern long long int llroundf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llroundf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3213extern _Float128 fdimf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __fdimf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3214extern _Float128 fmaxf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __fmaxf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3215extern _Float128 fminf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __fminf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3216extern _Float128 fmaf128 (_Float128 __x, _Float128 __y, _Float128 __z) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __fmaf128 (_Float128 __x, _Float128 __y, _Float128 __z) __attribute__ ((__nothrow__ , __leaf__));
3217extern _Float128 roundevenf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __roundevenf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3218extern __intmax_t fromfpf128 (_Float128 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpf128 (_Float128 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3219extern __uintmax_t ufromfpf128 (_Float128 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpf128 (_Float128 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3220extern __intmax_t fromfpxf128 (_Float128 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpxf128 (_Float128 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3221extern __uintmax_t ufromfpxf128 (_Float128 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpxf128 (_Float128 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3222extern _Float128 fmaxmagf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __fmaxmagf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3223extern _Float128 fminmagf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __fminmagf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3224extern int canonicalizef128 (_Float128 *__cx, const _Float128 *__x) __attribute__ ((__nothrow__ , __leaf__));
3225extern int totalorderf128 (const _Float128 *__x, const _Float128 *__y) __attribute__ ((__nothrow__ , __leaf__))
3226 __attribute__ ((__pure__));
3227extern int totalordermagf128 (const _Float128 *__x, const _Float128 *__y) __attribute__ ((__nothrow__ , __leaf__))
3228 __attribute__ ((__pure__));
3229extern _Float128 getpayloadf128 (const _Float128 *__x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __getpayloadf128 (const _Float128 *__x) __attribute__ ((__nothrow__ , __leaf__));
3230extern int setpayloadf128 (_Float128 *__x, _Float128 __payload) __attribute__ ((__nothrow__ , __leaf__));
3231extern int setpayloadsigf128 (_Float128 *__x, _Float128 __payload) __attribute__ ((__nothrow__ , __leaf__));
3232extern _Float32x acosf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __acosf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3233extern _Float32x asinf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __asinf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3234extern _Float32x atanf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __atanf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3235extern _Float32x atan2f32x (_Float32x __y, _Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __atan2f32x (_Float32x __y, _Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3236 extern _Float32x cosf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __cosf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3237 extern _Float32x sinf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __sinf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3238extern _Float32x tanf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __tanf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3239extern _Float32x coshf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __coshf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3240extern _Float32x sinhf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __sinhf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3241extern _Float32x tanhf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __tanhf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3242 extern void sincosf32x (_Float32x __x, _Float32x *__sinx, _Float32x *__cosx) __attribute__ ((__nothrow__ , __leaf__)); extern void __sincosf32x (_Float32x __x, _Float32x *__sinx, _Float32x *__cosx) __attribute__ ((__nothrow__ , __leaf__));
3243extern _Float32x acoshf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __acoshf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3244extern _Float32x asinhf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __asinhf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3245extern _Float32x atanhf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __atanhf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3246 extern _Float32x expf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __expf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3247extern _Float32x frexpf32x (_Float32x __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __frexpf32x (_Float32x __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__));
3248extern _Float32x ldexpf32x (_Float32x __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __ldexpf32x (_Float32x __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__));
3249 extern _Float32x logf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __logf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3250extern _Float32x log10f32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __log10f32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3251extern _Float32x modff32x (_Float32x __x, _Float32x *__iptr) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __modff32x (_Float32x __x, _Float32x *__iptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
3252extern _Float32x exp10f32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __exp10f32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3253extern _Float32x expm1f32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __expm1f32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3254extern _Float32x log1pf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __log1pf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3255extern _Float32x logbf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __logbf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3256extern _Float32x exp2f32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __exp2f32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3257extern _Float32x log2f32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __log2f32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3258 extern _Float32x powf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __powf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__));
3259extern _Float32x sqrtf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __sqrtf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3260extern _Float32x hypotf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __hypotf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__));
3261extern _Float32x cbrtf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __cbrtf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3262extern _Float32x ceilf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __ceilf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3263extern _Float32x fabsf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __fabsf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3264extern _Float32x floorf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __floorf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3265extern _Float32x fmodf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __fmodf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__));
3266extern _Float32x copysignf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __copysignf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3267extern _Float32x nanf32x (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __nanf32x (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__));
3268extern _Float32x j0f32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __j0f32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__));
3269extern _Float32x j1f32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __j1f32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__));
3270extern _Float32x jnf32x (int, _Float32x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __jnf32x (int, _Float32x) __attribute__ ((__nothrow__ , __leaf__));
3271extern _Float32x y0f32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __y0f32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__));
3272extern _Float32x y1f32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __y1f32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__));
3273extern _Float32x ynf32x (int, _Float32x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __ynf32x (int, _Float32x) __attribute__ ((__nothrow__ , __leaf__));
3274extern _Float32x erff32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __erff32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__));
3275extern _Float32x erfcf32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __erfcf32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__));
3276extern _Float32x lgammaf32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __lgammaf32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__));
3277extern _Float32x tgammaf32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __tgammaf32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__));
3278extern _Float32x lgammaf32x_r (_Float32x, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __lgammaf32x_r (_Float32x, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__));
3279extern _Float32x rintf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __rintf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3280extern _Float32x nextafterf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __nextafterf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__));
3281extern _Float32x nextdownf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __nextdownf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3282extern _Float32x nextupf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __nextupf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3283extern _Float32x remainderf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __remainderf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__));
3284extern _Float32x scalbnf32x (_Float32x __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __scalbnf32x (_Float32x __x, int __n) __attribute__ ((__nothrow__ , __leaf__));
3285extern int ilogbf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern int __ilogbf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3286extern long int llogbf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __llogbf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3287extern _Float32x scalblnf32x (_Float32x __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __scalblnf32x (_Float32x __x, long int __n) __attribute__ ((__nothrow__ , __leaf__));
3288extern _Float32x nearbyintf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __nearbyintf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3289extern _Float32x roundf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __roundf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3290extern _Float32x truncf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __truncf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3291extern _Float32x remquof32x (_Float32x __x, _Float32x __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __remquof32x (_Float32x __x, _Float32x __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__));
3292extern long int lrintf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lrintf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3293__extension__
3294extern long long int llrintf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llrintf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3295extern long int lroundf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lroundf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3296__extension__
3297extern long long int llroundf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llroundf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3298extern _Float32x fdimf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __fdimf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__));
3299extern _Float32x fmaxf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __fmaxf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3300extern _Float32x fminf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __fminf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3301extern _Float32x fmaf32x (_Float32x __x, _Float32x __y, _Float32x __z) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __fmaf32x (_Float32x __x, _Float32x __y, _Float32x __z) __attribute__ ((__nothrow__ , __leaf__));
3302extern _Float32x roundevenf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __roundevenf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3303extern __intmax_t fromfpf32x (_Float32x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpf32x (_Float32x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3304extern __uintmax_t ufromfpf32x (_Float32x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpf32x (_Float32x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3305extern __intmax_t fromfpxf32x (_Float32x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpxf32x (_Float32x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3306extern __uintmax_t ufromfpxf32x (_Float32x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpxf32x (_Float32x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3307extern _Float32x fmaxmagf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __fmaxmagf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3308extern _Float32x fminmagf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __fminmagf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3309extern int canonicalizef32x (_Float32x *__cx, const _Float32x *__x) __attribute__ ((__nothrow__ , __leaf__));
3310extern int totalorderf32x (const _Float32x *__x, const _Float32x *__y) __attribute__ ((__nothrow__ , __leaf__))
3311 __attribute__ ((__pure__));
3312extern int totalordermagf32x (const _Float32x *__x, const _Float32x *__y) __attribute__ ((__nothrow__ , __leaf__))
3313 __attribute__ ((__pure__));
3314extern _Float32x getpayloadf32x (const _Float32x *__x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __getpayloadf32x (const _Float32x *__x) __attribute__ ((__nothrow__ , __leaf__));
3315extern int setpayloadf32x (_Float32x *__x, _Float32x __payload) __attribute__ ((__nothrow__ , __leaf__));
3316extern int setpayloadsigf32x (_Float32x *__x, _Float32x __payload) __attribute__ ((__nothrow__ , __leaf__));
3317extern _Float64x acosf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __acosf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3318extern _Float64x asinf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __asinf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3319extern _Float64x atanf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __atanf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3320extern _Float64x atan2f64x (_Float64x __y, _Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __atan2f64x (_Float64x __y, _Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3321 extern _Float64x cosf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __cosf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3322 extern _Float64x sinf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __sinf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3323extern _Float64x tanf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __tanf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3324extern _Float64x coshf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __coshf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3325extern _Float64x sinhf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __sinhf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3326extern _Float64x tanhf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __tanhf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3327 extern void sincosf64x (_Float64x __x, _Float64x *__sinx, _Float64x *__cosx) __attribute__ ((__nothrow__ , __leaf__)); extern void __sincosf64x (_Float64x __x, _Float64x *__sinx, _Float64x *__cosx) __attribute__ ((__nothrow__ , __leaf__));
3328extern _Float64x acoshf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __acoshf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3329extern _Float64x asinhf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __asinhf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3330extern _Float64x atanhf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __atanhf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3331 extern _Float64x expf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __expf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3332extern _Float64x frexpf64x (_Float64x __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __frexpf64x (_Float64x __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__));
3333extern _Float64x ldexpf64x (_Float64x __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __ldexpf64x (_Float64x __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__));
3334 extern _Float64x logf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __logf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3335extern _Float64x log10f64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __log10f64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3336extern _Float64x modff64x (_Float64x __x, _Float64x *__iptr) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __modff64x (_Float64x __x, _Float64x *__iptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
3337extern _Float64x exp10f64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __exp10f64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3338extern _Float64x expm1f64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __expm1f64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3339extern _Float64x log1pf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __log1pf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3340extern _Float64x logbf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __logbf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3341extern _Float64x exp2f64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __exp2f64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3342extern _Float64x log2f64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __log2f64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3343 extern _Float64x powf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __powf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3344extern _Float64x sqrtf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __sqrtf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3345extern _Float64x hypotf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __hypotf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3346extern _Float64x cbrtf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __cbrtf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3347extern _Float64x ceilf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __ceilf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3348extern _Float64x fabsf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __fabsf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3349extern _Float64x floorf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __floorf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3350extern _Float64x fmodf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __fmodf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3351extern _Float64x copysignf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __copysignf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3352extern _Float64x nanf64x (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __nanf64x (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__));
3353extern _Float64x j0f64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __j0f64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__));
3354extern _Float64x j1f64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __j1f64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__));
3355extern _Float64x jnf64x (int, _Float64x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __jnf64x (int, _Float64x) __attribute__ ((__nothrow__ , __leaf__));
3356extern _Float64x y0f64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __y0f64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__));
3357extern _Float64x y1f64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __y1f64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__));
3358extern _Float64x ynf64x (int, _Float64x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __ynf64x (int, _Float64x) __attribute__ ((__nothrow__ , __leaf__));
3359extern _Float64x erff64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __erff64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__));
3360extern _Float64x erfcf64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __erfcf64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__));
3361extern _Float64x lgammaf64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __lgammaf64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__));
3362extern _Float64x tgammaf64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __tgammaf64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__));
3363extern _Float64x lgammaf64x_r (_Float64x, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __lgammaf64x_r (_Float64x, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__));
3364extern _Float64x rintf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __rintf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3365extern _Float64x nextafterf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __nextafterf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3366extern _Float64x nextdownf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __nextdownf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3367extern _Float64x nextupf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __nextupf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3368extern _Float64x remainderf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __remainderf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3369extern _Float64x scalbnf64x (_Float64x __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __scalbnf64x (_Float64x __x, int __n) __attribute__ ((__nothrow__ , __leaf__));
3370extern int ilogbf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern int __ilogbf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3371extern long int llogbf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __llogbf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3372extern _Float64x scalblnf64x (_Float64x __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __scalblnf64x (_Float64x __x, long int __n) __attribute__ ((__nothrow__ , __leaf__));
3373extern _Float64x nearbyintf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __nearbyintf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3374extern _Float64x roundf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __roundf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3375extern _Float64x truncf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __truncf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3376extern _Float64x remquof64x (_Float64x __x, _Float64x __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __remquof64x (_Float64x __x, _Float64x __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__));
3377extern long int lrintf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lrintf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3378__extension__
3379extern long long int llrintf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llrintf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3380extern long int lroundf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lroundf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3381__extension__
3382extern long long int llroundf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llroundf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3383extern _Float64x fdimf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __fdimf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3384extern _Float64x fmaxf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __fmaxf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3385extern _Float64x fminf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __fminf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3386extern _Float64x fmaf64x (_Float64x __x, _Float64x __y, _Float64x __z) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __fmaf64x (_Float64x __x, _Float64x __y, _Float64x __z) __attribute__ ((__nothrow__ , __leaf__));
3387extern _Float64x roundevenf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __roundevenf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3388extern __intmax_t fromfpf64x (_Float64x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpf64x (_Float64x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3389extern __uintmax_t ufromfpf64x (_Float64x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpf64x (_Float64x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3390extern __intmax_t fromfpxf64x (_Float64x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpxf64x (_Float64x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3391extern __uintmax_t ufromfpxf64x (_Float64x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpxf64x (_Float64x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3392extern _Float64x fmaxmagf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __fmaxmagf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3393extern _Float64x fminmagf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __fminmagf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3394extern int canonicalizef64x (_Float64x *__cx, const _Float64x *__x) __attribute__ ((__nothrow__ , __leaf__));
3395extern int totalorderf64x (const _Float64x *__x, const _Float64x *__y) __attribute__ ((__nothrow__ , __leaf__))
3396 __attribute__ ((__pure__));
3397extern int totalordermagf64x (const _Float64x *__x, const _Float64x *__y) __attribute__ ((__nothrow__ , __leaf__))
3398 __attribute__ ((__pure__));
3399extern _Float64x getpayloadf64x (const _Float64x *__x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __getpayloadf64x (const _Float64x *__x) __attribute__ ((__nothrow__ , __leaf__));
3400extern int setpayloadf64x (_Float64x *__x, _Float64x __payload) __attribute__ ((__nothrow__ , __leaf__));
3401extern int setpayloadsigf64x (_Float64x *__x, _Float64x __payload) __attribute__ ((__nothrow__ , __leaf__));
3402extern float fadd (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__));
3403extern float fdiv (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__));
3404extern float fmul (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__));
3405extern float fsub (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__));
3406extern float faddl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
3407extern float fdivl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
3408extern float fmull (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
3409extern float fsubl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
3410extern double daddl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
3411extern double ddivl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
3412extern double dmull (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
3413extern double dsubl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
3414extern _Float32 f32addf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__));
3415extern _Float32 f32divf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__));
3416extern _Float32 f32mulf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__));
3417extern _Float32 f32subf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__));
3418extern _Float32 f32addf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__));
3419extern _Float32 f32divf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__));
3420extern _Float32 f32mulf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__));
3421extern _Float32 f32subf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__));
3422extern _Float32 f32addf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3423extern _Float32 f32divf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3424extern _Float32 f32mulf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3425extern _Float32 f32subf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3426extern _Float32 f32addf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3427extern _Float32 f32divf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3428extern _Float32 f32mulf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3429extern _Float32 f32subf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3430extern _Float32x f32xaddf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__));
3431extern _Float32x f32xdivf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__));
3432extern _Float32x f32xmulf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__));
3433extern _Float32x f32xsubf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__));
3434extern _Float32x f32xaddf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3435extern _Float32x f32xdivf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3436extern _Float32x f32xmulf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3437extern _Float32x f32xsubf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3438extern _Float32x f32xaddf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3439extern _Float32x f32xdivf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3440extern _Float32x f32xmulf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3441extern _Float32x f32xsubf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3442extern _Float64 f64addf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3443extern _Float64 f64divf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3444extern _Float64 f64mulf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3445extern _Float64 f64subf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3446extern _Float64 f64addf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3447extern _Float64 f64divf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3448extern _Float64 f64mulf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3449extern _Float64 f64subf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3450extern _Float64x f64xaddf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3451extern _Float64x f64xdivf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3452extern _Float64x f64xmulf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3453extern _Float64x f64xsubf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3454extern int signgam;
3455enum
3456 {
3457 FP_NAN =
3458 0,
3459 FP_INFINITE =
3460 1,
3461 FP_ZERO =
3462 2,
3463 FP_SUBNORMAL =
3464 3,
3465 FP_NORMAL =
3466 4
3467 };
3468extern int __iscanonicall (long double __x)
3469 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3470
3471
3472
3473extern size_t strlcpy(char *, const char*, size_t);
3474extern size_t strlcat(char *, const char*, size_t);
3475extern void setproctitle(const char *fmt, ...);
3476
3477
3478
3479
3480void *ruby_xmalloc(size_t) __attribute__ ((alloc_size (1)));
3481void *ruby_xmalloc2(size_t,size_t) __attribute__ ((alloc_size (1,2)));
3482void *ruby_xcalloc(size_t,size_t) __attribute__ ((alloc_size (1,2)));
3483void *ruby_xrealloc(void*,size_t) __attribute__ ((alloc_size (2)));
3484void *ruby_xrealloc2(void*,size_t,size_t) __attribute__ ((alloc_size (2,3)));
3485void ruby_xfree(void*);
3486
3487
3488
3489
3490typedef unsigned long VALUE;
3491typedef unsigned long ID;
3492typedef char ruby_check_sizeof_int[4 == sizeof(int) ? 1 : -1];
3493typedef char ruby_check_sizeof_long[8 == sizeof(long) ? 1 : -1];
3494typedef char ruby_check_sizeof_long_long[8 == sizeof(long long) ? 1 : -1];
3495typedef char ruby_check_sizeof_voidp[8 == sizeof(void*) ? 1 : -1];
3496VALUE rb_int2inum(intptr_t);
3497VALUE rb_uint2inum(uintptr_t);
3498VALUE rb_ll2inum(long long);
3499VALUE rb_ull2inum(unsigned long long);
3500__attribute__ ((__noreturn__)) void rb_out_of_int(long num);
3501static inline int
3502rb_long2int_inline(long n)
3503{
3504 int i = (int)n;
3505 if ((long)i != n)
3506 rb_out_of_int(n);
3507 return i;
3508}
3509static inline long
3510rb_fix2long(VALUE x)
3511{
3512 return ((long)(((long)(x))>>(int)(1)));
3513}
3514static inline unsigned long
3515rb_fix2ulong(VALUE x)
3516{
3517 return ((unsigned long)((long)(((long)(x))>>(int)(1))));
3518}
3519ID rb_sym2id(VALUE);
3520VALUE rb_id2sym(ID);
3521enum ruby_special_consts {
3522 RUBY_Qfalse = 0x00,
3523 RUBY_Qtrue = 0x14,
3524 RUBY_Qnil = 0x08,
3525 RUBY_Qundef = 0x34,
3526 RUBY_IMMEDIATE_MASK = 0x07,
3527 RUBY_FIXNUM_FLAG = 0x01,
3528 RUBY_FLONUM_MASK = 0x03,
3529 RUBY_FLONUM_FLAG = 0x02,
3530 RUBY_SYMBOL_FLAG = 0x0c,
3532};
3533enum ruby_value_type {
3534 RUBY_T_NONE = 0x00,
3535 RUBY_T_OBJECT = 0x01,
3536 RUBY_T_CLASS = 0x02,
3537 RUBY_T_MODULE = 0x03,
3538 RUBY_T_FLOAT = 0x04,
3539 RUBY_T_STRING = 0x05,
3540 RUBY_T_REGEXP = 0x06,
3541 RUBY_T_ARRAY = 0x07,
3542 RUBY_T_HASH = 0x08,
3543 RUBY_T_STRUCT = 0x09,
3544 RUBY_T_BIGNUM = 0x0a,
3545 RUBY_T_FILE = 0x0b,
3546 RUBY_T_DATA = 0x0c,
3547 RUBY_T_MATCH = 0x0d,
3548 RUBY_T_COMPLEX = 0x0e,
3549 RUBY_T_RATIONAL = 0x0f,
3550 RUBY_T_NIL = 0x11,
3551 RUBY_T_TRUE = 0x12,
3552 RUBY_T_FALSE = 0x13,
3553 RUBY_T_SYMBOL = 0x14,
3554 RUBY_T_FIXNUM = 0x15,
3555 RUBY_T_UNDEF = 0x16,
3556 RUBY_T_IMEMO = 0x1a,
3557 RUBY_T_NODE = 0x1b,
3558 RUBY_T_ICLASS = 0x1c,
3559 RUBY_T_ZOMBIE = 0x1d,
3560 RUBY_T_MASK = 0x1f
3561};
3562static inline int rb_type(VALUE obj);
3563void rb_check_type(VALUE,int);
3564VALUE rb_str_to_str(VALUE);
3565VALUE rb_string_value(volatile VALUE*);
3566char *rb_string_value_ptr(volatile VALUE*);
3567char *rb_string_value_cstr(volatile VALUE*);
3568void rb_check_safe_obj(VALUE);
3569void rb_check_safe_str(VALUE) __attribute__((error("rb_check_safe_str() and Check_SafeStr() are obsolete; use SafeStringValue() instead")));
3570VALUE rb_str_export(VALUE);
3571VALUE rb_str_export_locale(VALUE);
3572VALUE rb_get_path(VALUE);
3573VALUE rb_get_path_no_checksafe(VALUE);
3574void rb_secure(int);
3575int rb_safe_level(void);
3576void rb_set_safe_level(int);
3577int ruby_safe_level_2_error(void) __attribute__((error("$SAFE=2 to 4 are obsolete")));
3578int ruby_safe_level_2_warning(void) __attribute__((const,warning("$SAFE=2 to 4 are obsolete")));
3579void rb_set_safe_level_force(int);
3580void rb_secure_update(VALUE);
3581__attribute__ ((__noreturn__)) void rb_insecure_operation(void);
3582VALUE rb_errinfo(void);
3583void rb_set_errinfo(VALUE);
3584long rb_num2long(VALUE);
3585unsigned long rb_num2ulong(VALUE);
3586static inline long
3587rb_num2long_inline(VALUE x)
3588{
3589 if ((((int)(long)(x))&RUBY_FIXNUM_FLAG))
3590 return ((long)(((long)(x))>>(int)(1)));
3591 else
3592 return rb_num2long(x);
3593}
3594static inline unsigned long
3595rb_num2ulong_inline(VALUE x)
3596{
3597 if ((((int)(long)(x))&RUBY_FIXNUM_FLAG))
3598 return ((unsigned long)((long)(((long)(x))>>(int)(1))));
3599 else
3600 return rb_num2ulong(x);
3601}
3602long rb_num2int(VALUE);
3603long rb_fix2int(VALUE);
3604static inline int
3605rb_num2int_inline(VALUE x)
3606{
3607 if ((((int)(long)(x))&RUBY_FIXNUM_FLAG))
3608 return (int)rb_fix2int(x);
3609 else
3610 return (int)rb_num2int(x);
3611}
3612unsigned long rb_num2uint(VALUE);
3613unsigned long rb_fix2uint(VALUE);
3614short rb_num2short(VALUE);
3615unsigned short rb_num2ushort(VALUE);
3616short rb_fix2short(VALUE);
3617unsigned short rb_fix2ushort(VALUE);
3618static inline short
3619rb_num2short_inline(VALUE x)
3620{
3621 if ((((int)(long)(x))&RUBY_FIXNUM_FLAG))
3622 return rb_fix2short(x);
3623 else
3624 return rb_num2short(x);
3625}
3626long long rb_num2ll(VALUE);
3627unsigned long long rb_num2ull(VALUE);
3628static inline long long
3629rb_num2ll_inline(VALUE x)
3630{
3631 if ((((int)(long)(x))&RUBY_FIXNUM_FLAG))
3632 return ((long)(((long)(x))>>(int)(1)));
3633 else
3634 return rb_num2ll(x);
3635}
3636double rb_num2dbl(VALUE);
3637VALUE rb_uint2big(uintptr_t);
3638VALUE rb_int2big(intptr_t);
3639VALUE rb_newobj(void);
3640VALUE rb_newobj_of(VALUE, VALUE);
3641VALUE rb_obj_setup(VALUE obj, VALUE klass, VALUE type);
3642__extension__
3643enum ruby_fl_type {
3644 RUBY_FL_WB_PROTECTED = (1<<5),
3645 RUBY_FL_PROMOTED0 = (1<<5),
3646 RUBY_FL_PROMOTED1 = (1<<6),
3648 RUBY_FL_FINALIZE = (1<<7),
3649 RUBY_FL_TAINT = (1<<8),
3651 RUBY_FL_EXIVAR = (1<<10),
3652 RUBY_FL_FREEZE = (1<<11),
3653 RUBY_FL_USHIFT = 12,
3654 RUBY_FL_USER0 = (1<<(RUBY_FL_USHIFT+0)),
3655 RUBY_FL_USER1 = (1<<(RUBY_FL_USHIFT+1)),
3656 RUBY_FL_USER2 = (1<<(RUBY_FL_USHIFT+2)),
3657 RUBY_FL_USER3 = (1<<(RUBY_FL_USHIFT+3)),
3658 RUBY_FL_USER4 = (1<<(RUBY_FL_USHIFT+4)),
3659 RUBY_FL_USER5 = (1<<(RUBY_FL_USHIFT+5)),
3660 RUBY_FL_USER6 = (1<<(RUBY_FL_USHIFT+6)),
3661 RUBY_FL_USER7 = (1<<(RUBY_FL_USHIFT+7)),
3662 RUBY_FL_USER8 = (1<<(RUBY_FL_USHIFT+8)),
3663 RUBY_FL_USER9 = (1<<(RUBY_FL_USHIFT+9)),
3664 RUBY_FL_USER10 = (1<<(RUBY_FL_USHIFT+10)),
3665 RUBY_FL_USER11 = (1<<(RUBY_FL_USHIFT+11)),
3666 RUBY_FL_USER12 = (1<<(RUBY_FL_USHIFT+12)),
3667 RUBY_FL_USER13 = (1<<(RUBY_FL_USHIFT+13)),
3668 RUBY_FL_USER14 = (1<<(RUBY_FL_USHIFT+14)),
3669 RUBY_FL_USER15 = (1<<(RUBY_FL_USHIFT+15)),
3670 RUBY_FL_USER16 = (1<<(RUBY_FL_USHIFT+16)),
3671 RUBY_FL_USER17 = (1<<(RUBY_FL_USHIFT+17)),
3672 RUBY_FL_USER18 = (1<<(RUBY_FL_USHIFT+18)),
3673 RUBY_FL_USER19 = (1<<(RUBY_FL_USHIFT+19)),
3677};
3678struct __attribute__((__aligned__(8))) RBasic {
3679 VALUE flags;
3680 const VALUE klass;
3681};
3682VALUE rb_obj_hide(VALUE obj);
3683VALUE rb_obj_reveal(VALUE obj, VALUE klass);
3684enum ruby_robject_flags {
3686 ROBJECT_EMBED = RUBY_FL_USER1,
3687 ROBJECT_ENUM_END
3688};
3689struct RObject {
3690 struct RBasic basic;
3691 union {
3692 struct {
3693 uint32_t numiv;
3694 VALUE *ivptr;
3695 void *iv_index_tbl;
3696 } heap;
3698 } as;
3699};
3700enum ruby_rmodule_flags {
3701 RMODULE_IS_OVERLAID = RUBY_FL_USER2,
3702 RMODULE_IS_REFINEMENT = RUBY_FL_USER3,
3703 RMODULE_INCLUDED_INTO_REFINEMENT = RUBY_FL_USER4,
3704 RMODULE_ENUM_END
3705};
3706__attribute__ ((__pure__)) double rb_float_value(VALUE);
3707VALUE rb_float_new(double);
3708VALUE rb_float_new_in_heap(double);
3709enum ruby_rstring_flags {
3710 RSTRING_NOEMBED = RUBY_FL_USER1,
3711 RSTRING_EMBED_LEN_MASK = (RUBY_FL_USER2|RUBY_FL_USER3|RUBY_FL_USER4|
3713 RSTRING_EMBED_LEN_SHIFT = (RUBY_FL_USHIFT+2),
3714 RSTRING_EMBED_LEN_MAX = (int)((sizeof(VALUE)*3)/sizeof(char)-1),
3715 RSTRING_FSTR = RUBY_FL_USER17,
3716 RSTRING_ENUM_END
3717};
3718struct RString {
3719 struct RBasic basic;
3720 union {
3721 struct {
3722 long len;
3723 char *ptr;
3724 union {
3725 long capa;
3726 VALUE shared;
3727 } aux;
3728 } heap;
3729 char ary[RSTRING_EMBED_LEN_MAX + 1];
3730 } as;
3731};
3732enum ruby_rarray_flags {
3733 RARRAY_EMBED_LEN_MAX = 3,
3734 RARRAY_EMBED_FLAG = RUBY_FL_USER1,
3735 RARRAY_EMBED_LEN_MASK = (RUBY_FL_USER4|RUBY_FL_USER3),
3737 RARRAY_TRANSIENT_FLAG = RUBY_FL_USER13,
3738 RARRAY_ENUM_END
3739};
3740struct RArray {
3741 struct RBasic basic;
3742 union {
3743 struct {
3744 long len;
3745 union {
3746 long capa;
3747 VALUE shared;
3748 } aux;
3749 const VALUE *ptr;
3750 } heap;
3751 const VALUE ary[RARRAY_EMBED_LEN_MAX];
3752 } as;
3753};
3754struct RRegexp {
3755 struct RBasic basic;
3756 struct re_pattern_buffer *ptr;
3757 const VALUE src;
3758 unsigned long usecnt;
3759};
3760size_t rb_hash_size_num(VALUE hash);
3761struct RFile {
3762 struct RBasic basic;
3763 struct rb_io_t *fptr;
3764};
3765struct RData {
3766 struct RBasic basic;
3767 void (*dmark)(void*);
3768 void (*dfree)(void*);
3769 void *data;
3770};
3771typedef struct rb_data_type_struct rb_data_type_t;
3772struct rb_data_type_struct {
3773 const char *wrap_struct_name;
3774 struct {
3775 void (*dmark)(void*);
3776 void (*dfree)(void*);
3777 size_t (*dsize)(const void *);
3778 void *reserved[2];
3779 } function;
3780 const rb_data_type_t *parent;
3781 void *data;
3782 VALUE flags;
3783};
3784struct RTypedData {
3785 struct RBasic basic;
3786 const rb_data_type_t *type;
3787 VALUE typed_flag;
3788 void *data;
3789};
3790typedef void (*RUBY_DATA_FUNC)(void*);
3793VALUE rb_data_typed_object_wrap(VALUE klass, void *datap, const rb_data_type_t *);
3794VALUE rb_data_typed_object_zalloc(VALUE klass, size_t size, const rb_data_type_t *type);
3795int rb_typeddata_inherited_p(const rb_data_type_t *child, const rb_data_type_t *parent);
3796int rb_typeddata_is_kind_of(VALUE, const rb_data_type_t *);
3797void *rb_check_typeddata(VALUE, const rb_data_type_t *);
3798int rb_big_sign(VALUE);
3799void rb_freeze_singleton_class(VALUE klass);
3800static inline void
3801rb_obj_freeze_inline(VALUE x)
3802{
3803 if ((!(((VALUE)(x) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(x) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(x))->flags & RUBY_T_MASK) != RUBY_T_NODE)) {
3804 (void)(((struct RBasic*)(x))->flags |= RUBY_FL_FREEZE);
3805 if ((((struct RBasic*)(x))->klass) && !(((struct RBasic*)(x))->flags & RUBY_FL_SINGLETON)) {
3806 rb_freeze_singleton_class(x);
3807 }
3808 }
3809}
3810static inline VALUE rb_data_object_wrap_warning(VALUE,void*,RUBY_DATA_FUNC,RUBY_DATA_FUNC) __attribute__((warning("untyped Data is unsafe; use TypedData instead")));
3811static inline void *rb_data_object_get_warning(VALUE) __attribute__((warning("untyped Data is unsafe; use TypedData instead")));
3812static inline VALUE
3813rb_data_object_wrap_warning(VALUE klass, void *ptr, RUBY_DATA_FUNC mark, RUBY_DATA_FUNC free)
3814{
3815 return rb_data_object_wrap(klass, ptr, mark, free);
3816}
3817static inline void *
3818rb_data_object_get(VALUE obj)
3819{
3820 rb_check_type((VALUE)(obj),(RUBY_T_DATA));
3821 return ((struct RData *)obj)->data;
3822}
3823static inline void *
3824rb_data_object_get_warning(VALUE obj)
3825{
3826 return rb_data_object_get(obj);
3827}
3828static inline VALUE
3829rb_data_object_make(VALUE klass, RUBY_DATA_FUNC mark_func, RUBY_DATA_FUNC free_func, void **datap, size_t size)
3830{
3831 VALUE result = rb_data_object_zalloc((klass), (size), (RUBY_DATA_FUNC)(mark_func), (RUBY_DATA_FUNC)(free_func)); (void)((*datap) = (void *)(((struct RData*)(result))->data));;
3832 return result;
3833}
3834static inline VALUE
3835rb_data_typed_object_make(VALUE klass, const rb_data_type_t *type, void **datap, size_t size)
3836{
3837 VALUE result = rb_data_typed_object_zalloc(klass, size, type); (void)((*datap) = (void *)(((struct RData*)(result))->data));;
3838 return result;
3839}
3840__attribute__ ((__deprecated__("by ""rb_data_object_wrap"))) static inline VALUE rb_data_object_alloc(VALUE,void*,RUBY_DATA_FUNC,RUBY_DATA_FUNC);
3841static inline VALUE
3842rb_data_object_alloc(VALUE klass, void *data, RUBY_DATA_FUNC dmark, RUBY_DATA_FUNC dfree)
3843{
3844 return rb_data_object_wrap(klass, data, dmark, dfree);
3845}
3846__attribute__ ((__deprecated__("by ""rb_data_typed_object_wrap"))) static inline VALUE rb_data_typed_object_alloc(VALUE,void*,const rb_data_type_t*);
3847static inline VALUE
3848rb_data_typed_object_alloc(VALUE klass, void *datap, const rb_data_type_t *type)
3849{
3850 return rb_data_typed_object_wrap(klass, datap, type);
3851}
3852void rb_gc_writebarrier(VALUE a, VALUE b);
3853void rb_gc_writebarrier_unprotect(VALUE obj);
3854static inline VALUE
3855rb_obj_wb_unprotect(VALUE x, const char *filename __attribute__ ((unused)), int line __attribute__ ((unused)))
3856{
3858 return x;
3859}
3860static inline VALUE
3861rb_obj_written(VALUE a, VALUE oldv __attribute__ ((unused)), VALUE b, const char *filename __attribute__ ((unused)), int line __attribute__ ((unused)))
3862{
3863 if (!(((VALUE)(b) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(b) & (VALUE)~((VALUE)RUBY_Qnil)) == 0))) {
3864 rb_gc_writebarrier(a, b);
3865 }
3866 return a;
3867}
3868static inline VALUE
3869rb_obj_write(VALUE a, VALUE *slot, VALUE b, const char *filename __attribute__ ((unused)), int line __attribute__ ((unused)))
3870{
3871 *slot = b;
3872 rb_obj_written(a, ((VALUE)RUBY_Qundef) , b, filename, line);
3873 return a;
3874}
3875static inline int
3876rb_integer_type_p(VALUE obj)
3877{
3878 return ((((int)(long)(obj))&RUBY_FIXNUM_FLAG) ||
3879 (!(((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) &&
3880 (int)(((struct RBasic*)(obj))->flags & RUBY_T_MASK) == RUBY_T_BIGNUM));
3881}
3882static inline VALUE
3883rb_long2num_inline(long v)
3884{
3885 if ((((v) < (0x7fffffffffffffffL>>1)+1) && ((v) >= (((long)(-0x7fffffffffffffffL - 1L))>>(int)(1)))))
3886 return (((VALUE)(v))<<1 | RUBY_FIXNUM_FLAG);
3887 else
3888 return rb_int2big(v);
3889}
3890static inline VALUE
3891rb_ulong2num_inline(unsigned long v)
3892{
3893 if (((v) < (0x7fffffffffffffffL>>1)+1))
3894 return (((VALUE)(v))<<1 | RUBY_FIXNUM_FLAG);
3895 else
3896 return rb_uint2big(v);
3897}
3898static inline char
3899rb_num2char_inline(VALUE x)
3900{
3901 if (( ((RUBY_T_STRING) == RUBY_T_FIXNUM) ? (((int)(long)(x))&RUBY_FIXNUM_FLAG) : ((RUBY_T_STRING) == RUBY_T_TRUE) ? ((x) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_STRING) == RUBY_T_FALSE) ? ((x) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_STRING) == RUBY_T_NIL) ? ((x) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_STRING) == RUBY_T_UNDEF) ? ((x) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_STRING) == RUBY_T_SYMBOL) ? ((((VALUE)(x)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(x) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(x) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(x))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_STRING) == RUBY_T_FLOAT) ? ( ((((int)(long)(x))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(x) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(x) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(x))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(x) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(x) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(x))->flags & RUBY_T_MASK) == (RUBY_T_STRING))) && ((!(((struct RBasic*)(x))->flags & RSTRING_NOEMBED) ? (long)((((struct RBasic*)(x))->flags >> RSTRING_EMBED_LEN_SHIFT) & (RSTRING_EMBED_LEN_MASK >> RSTRING_EMBED_LEN_SHIFT)) : ((struct RString*)(x))->as.heap.len)>=1))
3902 return (!(((struct RBasic*)(x))->flags & RSTRING_NOEMBED) ? ((struct RString*)(x))->as.ary : ((struct RString*)(x))->as.heap.ptr)[0];
3903 else
3904 return (char)(rb_num2int_inline(x) & 0xff);
3905}
3906void *rb_alloc_tmp_buffer(volatile VALUE *store, long len) __attribute__ ((alloc_size (2)));
3907void *rb_alloc_tmp_buffer_with_count(volatile VALUE *store, size_t len,size_t count) __attribute__ ((alloc_size (2,3)));
3908void rb_free_tmp_buffer(volatile VALUE *store);
3909__attribute__ ((__noreturn__)) void ruby_malloc_size_overflow(size_t, size_t);
3910static inline int
3911rb_mul_size_overflow(size_t a, size_t b, size_t max, size_t *c)
3912{
3913 __extension__
3914 unsigned __int128 c2 = (unsigned __int128)a * (unsigned __int128)b;
3915 if (c2 > max) return 1;
3916 *c = (size_t)c2;
3917 return 0;
3918}
3919static inline void *
3920rb_alloc_tmp_buffer2(volatile VALUE *store, long count, size_t elsize)
3921{
3922 size_t cnt = (size_t)count;
3923 if (elsize == sizeof(VALUE)) {
3924 if ((__builtin_expect(!!(cnt > 0x7fffffffffffffffL / sizeof(VALUE)), 0))) {
3925 ruby_malloc_size_overflow(cnt, elsize);
3926 }
3927 }
3928 else {
3929 size_t size, max = 0x7fffffffffffffffL - sizeof(VALUE) + 1;
3930 if ((__builtin_expect(!!(rb_mul_size_overflow(cnt, elsize, max, &size)), 0))) {
3931 ruby_malloc_size_overflow(cnt, elsize);
3932 }
3933 cnt = (size + sizeof(VALUE) - 1) / sizeof(VALUE);
3934 }
3935 return rb_alloc_tmp_buffer_with_count(store, cnt * sizeof(VALUE), cnt);
3936}
3937void rb_obj_infect(VALUE victim, VALUE carrier);
3938typedef int ruby_glob_func(const char*,VALUE, void*);
3939void rb_glob(const char*,void(*)(const char*,VALUE,void*),VALUE);
3940int ruby_glob(const char*,int,ruby_glob_func*,VALUE);
3941int ruby_brace_glob(const char*,int,ruby_glob_func*,VALUE);
3942VALUE rb_define_class(const char*,VALUE);
3943VALUE rb_define_module(const char*);
3944VALUE rb_define_class_under(VALUE, const char*, VALUE);
3945VALUE rb_define_module_under(VALUE, const char*);
3946void rb_include_module(VALUE,VALUE);
3947void rb_extend_object(VALUE,VALUE);
3948void rb_prepend_module(VALUE,VALUE);
3949struct rb_global_variable;
3950typedef VALUE rb_gvar_getter_t(ID id, void *data, struct rb_global_variable *gvar);
3951typedef void rb_gvar_setter_t(VALUE val, ID id, void *data, struct rb_global_variable *gvar);
3952typedef void rb_gvar_marker_t(VALUE *var);
3953VALUE rb_gvar_undef_getter(ID id, void *data, struct rb_global_variable *gvar);
3954void rb_gvar_undef_setter(VALUE val, ID id, void *data, struct rb_global_variable *gvar);
3955void rb_gvar_undef_marker(VALUE *var);
3956VALUE rb_gvar_val_getter(ID id, void *data, struct rb_global_variable *gvar);
3957void rb_gvar_val_setter(VALUE val, ID id, void *data, struct rb_global_variable *gvar);
3958void rb_gvar_val_marker(VALUE *var);
3959VALUE rb_gvar_var_getter(ID id, void *data, struct rb_global_variable *gvar);
3960void rb_gvar_var_setter(VALUE val, ID id, void *data, struct rb_global_variable *gvar);
3961void rb_gvar_var_marker(VALUE *var);
3962__attribute__ ((__noreturn__)) void rb_gvar_readonly_setter(VALUE val, ID id, void *data, struct rb_global_variable *gvar);
3963void rb_define_variable(const char*,VALUE*);
3964void rb_define_virtual_variable(const char*,VALUE(*)(),void(*)());
3965void rb_define_hooked_variable(const char*,VALUE*,VALUE(*)(),void(*)());
3966void rb_define_readonly_variable(const char*,const VALUE*);
3967void rb_define_const(VALUE,const char*,VALUE);
3968void rb_define_global_const(const char*,VALUE);
3969void rb_define_method(VALUE,const char*,VALUE(*)(),int);
3970void rb_define_module_function(VALUE,const char*,VALUE(*)(),int);
3971void rb_define_global_function(const char*,VALUE(*)(),int);
3972void rb_undef_method(VALUE,const char*);
3973void rb_define_alias(VALUE,const char*,const char*);
3974void rb_define_attr(VALUE,const char*,int,int);
3975void rb_global_variable(VALUE*);
3976void rb_gc_register_mark_object(VALUE);
3977void rb_gc_register_address(VALUE*);
3978void rb_gc_unregister_address(VALUE*);
3979ID rb_intern(const char*);
3980ID rb_intern2(const char*, long);
3981ID rb_intern_str(VALUE str);
3982const char *rb_id2name(ID);
3983ID rb_check_id(volatile VALUE *);
3984ID rb_to_id(VALUE);
3985VALUE rb_id2str(ID);
3986VALUE rb_sym2str(VALUE);
3987VALUE rb_to_symbol(VALUE name);
3988VALUE rb_check_symbol(volatile VALUE *namep);
3989__attribute__ ((__error__ (" argument length doesn't match"))) int rb_varargs_bad_length(int,int);
3990const char *rb_class2name(VALUE);
3991const char *rb_obj_classname(VALUE);
3992void rb_p(VALUE);
3993VALUE rb_eval_string(const char*);
3994VALUE rb_eval_string_protect(const char*, int*);
3995VALUE rb_eval_string_wrap(const char*, int*);
3996VALUE rb_funcall(VALUE, ID, int, ...);
3997VALUE rb_funcallv(VALUE, ID, int, const VALUE*);
3998VALUE rb_funcallv_public(VALUE, ID, int, const VALUE*);
3999VALUE rb_funcall_passing_block(VALUE, ID, int, const VALUE*);
4000VALUE rb_funcall_with_block(VALUE, ID, int, const VALUE*, VALUE);
4001int rb_scan_args(int, const VALUE*, const char*, ...);
4002VALUE rb_call_super(int, const VALUE*);
4003VALUE rb_current_receiver(void);
4004int rb_get_kwargs(VALUE keyword_hash, const ID *table, int required, int optional, VALUE *);
4005VALUE rb_extract_keywords(VALUE *orighash);
4006VALUE rb_gv_set(const char*, VALUE);
4007VALUE rb_gv_get(const char*);
4008VALUE rb_iv_get(VALUE, const char*);
4009VALUE rb_iv_set(VALUE, const char*, VALUE);
4010VALUE rb_equal(VALUE,VALUE);
4011VALUE *rb_ruby_verbose_ptr(void);
4012VALUE *rb_ruby_debug_ptr(void);
4013enum rb_io_wait_readwrite {RB_IO_WAIT_READABLE, RB_IO_WAIT_WRITABLE};
4014__attribute__ ((__noreturn__)) void rb_raise(VALUE, const char*, ...) __attribute__((format(printf, 2, 3)));
4015__attribute__ ((__noreturn__)) void rb_fatal(const char*, ...) __attribute__((format(printf, 1, 2)));
4016__attribute__((cold)) __attribute__ ((__noreturn__)) void rb_bug(const char*, ...) __attribute__((format(printf, 1, 2)));
4017__attribute__ ((__noreturn__)) void rb_bug_errno(const char*, int);
4018__attribute__ ((__noreturn__)) void rb_sys_fail(const char*);
4019__attribute__ ((__noreturn__)) void rb_sys_fail_str(VALUE);
4020__attribute__ ((__noreturn__)) void rb_mod_sys_fail(VALUE, const char*);
4021__attribute__ ((__noreturn__)) void rb_mod_sys_fail_str(VALUE, VALUE);
4022__attribute__ ((__noreturn__)) void rb_readwrite_sys_fail(enum rb_io_wait_readwrite, const char*);
4023__attribute__ ((__noreturn__)) void rb_iter_break(void);
4024__attribute__ ((__noreturn__)) void rb_iter_break_value(VALUE);
4025__attribute__ ((__noreturn__)) void rb_exit(int);
4026__attribute__ ((__noreturn__)) void rb_notimplement(void);
4027VALUE rb_syserr_new(int, const char *);
4028VALUE rb_syserr_new_str(int n, VALUE arg);
4029__attribute__ ((__noreturn__)) void rb_syserr_fail(int, const char*);
4030__attribute__ ((__noreturn__)) void rb_syserr_fail_str(int, VALUE);
4031__attribute__ ((__noreturn__)) void rb_mod_syserr_fail(VALUE, int, const char*);
4032__attribute__ ((__noreturn__)) void rb_mod_syserr_fail_str(VALUE, int, VALUE);
4033__attribute__ ((__noreturn__)) void rb_readwrite_syserr_fail(enum rb_io_wait_readwrite, int, const char*);
4034void rb_warning(const char*, ...) __attribute__((format(printf, 1, 2)));
4035void rb_compile_warning(const char *, int, const char*, ...) __attribute__((format(printf, 3, 4)));
4036void rb_sys_warning(const char*, ...) __attribute__((format(printf, 1, 2)));
4037__attribute__((cold)) void rb_warn(const char*, ...) __attribute__((format(printf, 1, 2)));
4038void rb_compile_warn(const char *, int, const char*, ...) __attribute__((format(printf, 3, 4)));
4039typedef VALUE rb_block_call_func(VALUE yielded_arg, VALUE callback_arg, int argc, const VALUE *argv, VALUE blockarg);
4040typedef VALUE (*rb_block_call_func_t)();
4041VALUE rb_each(VALUE);
4042VALUE rb_yield(VALUE);
4043VALUE rb_yield_values(int n, ...);
4044VALUE rb_yield_values2(int n, const VALUE *argv);
4045VALUE rb_yield_splat(VALUE);
4046VALUE rb_yield_block(VALUE, VALUE, int, const VALUE *, VALUE);
4047int rb_block_given_p(void);
4048void rb_need_block(void);
4049VALUE rb_iterate(VALUE(*)(VALUE),VALUE,VALUE(*)(),VALUE);
4050VALUE rb_block_call(VALUE,ID,int,const VALUE*,rb_block_call_func_t,VALUE);
4051VALUE rb_rescue(VALUE(*)(),VALUE,VALUE(*)(),VALUE);
4052VALUE rb_rescue2(VALUE(*)(),VALUE,VALUE(*)(),VALUE,...);
4053VALUE rb_ensure(VALUE(*)(),VALUE,VALUE(*)(),VALUE);
4054VALUE rb_catch(const char*,VALUE(*)(),VALUE);
4055VALUE rb_catch_obj(VALUE,VALUE(*)(),VALUE);
4056__attribute__ ((__noreturn__)) void rb_throw(const char*,VALUE);
4057__attribute__ ((__noreturn__)) void rb_throw_obj(VALUE,VALUE);
4058VALUE rb_require(const char*);
4059extern VALUE rb_mKernel;
4060extern VALUE rb_mComparable;
4061extern VALUE rb_mEnumerable;
4062extern VALUE rb_mErrno;
4063extern VALUE rb_mFileTest;
4064extern VALUE rb_mGC;
4065extern VALUE rb_mMath;
4066extern VALUE rb_mProcess;
4067extern VALUE rb_mWaitReadable;
4068extern VALUE rb_mWaitWritable;
4069extern VALUE rb_cBasicObject;
4070extern VALUE rb_cObject;
4071extern VALUE rb_cArray;
4072extern VALUE rb_cBinding;
4073extern VALUE rb_cClass;
4074extern VALUE rb_cCont;
4075extern VALUE rb_cData;
4076extern VALUE rb_cDir;
4077extern VALUE rb_cEncoding;
4078extern VALUE rb_cEnumerator;
4079extern VALUE rb_cFalseClass;
4080extern VALUE rb_cFile;
4081extern VALUE rb_cComplex;
4082extern VALUE rb_cFloat;
4083extern VALUE rb_cHash;
4084extern VALUE rb_cIO;
4085extern VALUE rb_cInteger;
4086extern VALUE rb_cMatch;
4087extern VALUE rb_cMethod;
4088extern VALUE rb_cModule;
4089extern VALUE rb_cNameErrorMesg;
4090extern VALUE rb_cNilClass;
4091extern VALUE rb_cNumeric;
4092extern VALUE rb_cProc;
4093extern VALUE rb_cRandom;
4094extern VALUE rb_cRange;
4095extern VALUE rb_cRational;
4096extern VALUE rb_cRegexp;
4097extern VALUE rb_cStat;
4098extern VALUE rb_cString;
4099extern VALUE rb_cStruct;
4100extern VALUE rb_cSymbol;
4101extern VALUE rb_cThread;
4102extern VALUE rb_cTime;
4103extern VALUE rb_cTrueClass;
4104extern VALUE rb_cUnboundMethod;
4105extern VALUE rb_eException;
4106extern VALUE rb_eStandardError;
4107extern VALUE rb_eSystemExit;
4108extern VALUE rb_eInterrupt;
4109extern VALUE rb_eSignal;
4110extern VALUE rb_eFatal;
4111extern VALUE rb_eArgError;
4112extern VALUE rb_eEOFError;
4113extern VALUE rb_eIndexError;
4114extern VALUE rb_eStopIteration;
4115extern VALUE rb_eKeyError;
4116extern VALUE rb_eRangeError;
4117extern VALUE rb_eIOError;
4118extern VALUE rb_eRuntimeError;
4119extern VALUE rb_eFrozenError;
4120extern VALUE rb_eSecurityError;
4121extern VALUE rb_eSystemCallError;
4122extern VALUE rb_eThreadError;
4123extern VALUE rb_eTypeError;
4124extern VALUE rb_eZeroDivError;
4125extern VALUE rb_eNotImpError;
4126extern VALUE rb_eNoMemError;
4127extern VALUE rb_eNoMethodError;
4128extern VALUE rb_eFloatDomainError;
4129extern VALUE rb_eLocalJumpError;
4130extern VALUE rb_eSysStackError;
4131extern VALUE rb_eRegexpError;
4132extern VALUE rb_eEncodingError;
4133extern VALUE rb_eEncCompatError;
4134extern VALUE rb_eScriptError;
4135extern VALUE rb_eNameError;
4136extern VALUE rb_eSyntaxError;
4137extern VALUE rb_eLoadError;
4138extern VALUE rb_eMathDomainError;
4140static inline VALUE
4141rb_class_of(VALUE obj)
4142{
4143 if (((VALUE)(obj) & RUBY_IMMEDIATE_MASK)) {
4144 if ((((int)(long)(obj))&RUBY_FIXNUM_FLAG)) return rb_cInteger;
4145 if (((((int)(long)(obj))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG)) return rb_cFloat;
4146 if (obj == ((VALUE)RUBY_Qtrue)) return rb_cTrueClass;
4147 if ((((VALUE)(obj)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)) return rb_cSymbol;
4148 }
4149 else if (!!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) {
4150 if (obj == ((VALUE)RUBY_Qnil)) return rb_cNilClass;
4151 if (obj == ((VALUE)RUBY_Qfalse)) return rb_cFalseClass;
4152 }
4153 return ((struct RBasic*)(obj))->klass;
4154}
4155static inline int
4156rb_type(VALUE obj)
4157{
4158 if (((VALUE)(obj) & RUBY_IMMEDIATE_MASK)) {
4159 if ((((int)(long)(obj))&RUBY_FIXNUM_FLAG)) return RUBY_T_FIXNUM;
4160 if (((((int)(long)(obj))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG)) return RUBY_T_FLOAT;
4161 if (obj == ((VALUE)RUBY_Qtrue)) return RUBY_T_TRUE;
4162 if ((((VALUE)(obj)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)) return RUBY_T_SYMBOL;
4163 if (obj == ((VALUE)RUBY_Qundef)) return RUBY_T_UNDEF;
4164 }
4165 else if (!!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) {
4166 if (obj == ((VALUE)RUBY_Qnil)) return RUBY_T_NIL;
4167 if (obj == ((VALUE)RUBY_Qfalse)) return RUBY_T_FALSE;
4168 }
4169 return (int)(((struct RBasic*)(obj))->flags & RUBY_T_MASK);
4170}
4171
4172
4173typedef unsigned long st_data_t;
4174typedef struct st_table st_table;
4175typedef st_data_t st_index_t;
4176typedef int st_compare_func(st_data_t, st_data_t);
4177typedef st_index_t st_hash_func(st_data_t);
4178typedef char st_check_for_sizeof_st_index_t[8 == (int)sizeof(st_index_t) ? 1 : -1];
4180 int (*compare)( );
4181 st_index_t (*hash)( );
4182};
4183typedef struct st_table_entry st_table_entry;
4184struct st_table_entry;
4185struct st_table {
4186 unsigned char entry_power, bin_power, size_ind;
4187 unsigned int rebuilds_num;
4188 const struct st_hash_type *type;
4189 st_index_t num_entries;
4190 st_index_t *bins;
4191 st_index_t entries_start, entries_bound;
4192 st_table_entry *entries;
4193};
4194enum st_retval {ST_CONTINUE, ST_STOP, ST_DELETE, ST_CHECK};
4195st_table *st_init_table(const struct st_hash_type *);
4196st_table *st_init_table_with_size(const struct st_hash_type *, st_index_t);
4197st_table *st_init_numtable(void);
4198st_table *st_init_numtable_with_size(st_index_t);
4199st_table *st_init_strtable(void);
4200st_table *st_init_strtable_with_size(st_index_t);
4201st_table *st_init_strcasetable(void);
4202st_table *st_init_strcasetable_with_size(st_index_t);
4203int st_delete(st_table *, st_data_t *, st_data_t *);
4204int st_delete_safe(st_table *, st_data_t *, st_data_t *, st_data_t);
4205int st_shift(st_table *, st_data_t *, st_data_t *);
4206int st_insert(st_table *, st_data_t, st_data_t);
4207int st_insert2(st_table *, st_data_t, st_data_t, st_data_t (*)(st_data_t));
4208int st_lookup(st_table *, st_data_t, st_data_t *);
4209int st_get_key(st_table *, st_data_t, st_data_t *);
4210typedef int st_update_callback_func(st_data_t *key, st_data_t *value, st_data_t arg, int existing);
4211int st_update(st_table *table, st_data_t key, st_update_callback_func *func, st_data_t arg);
4212int st_foreach(st_table *, int (*)(), st_data_t);
4213int st_foreach_check(st_table *, int (*)(), st_data_t, st_data_t);
4214st_index_t st_keys(st_table *table, st_data_t *keys, st_index_t size);
4215st_index_t st_keys_check(st_table *table, st_data_t *keys, st_index_t size, st_data_t never);
4216st_index_t st_values(st_table *table, st_data_t *values, st_index_t size);
4217st_index_t st_values_check(st_table *table, st_data_t *values, st_index_t size, st_data_t never);
4218void st_add_direct(st_table *, st_data_t, st_data_t);
4219void st_free_table(st_table *);
4220void st_cleanup_safe(st_table *, st_data_t);
4221void st_clear(st_table *);
4222st_table *st_copy(st_table *);
4223__attribute__ ((__const__)) int st_numcmp(st_data_t, st_data_t);
4224__attribute__ ((__const__)) st_index_t st_numhash(st_data_t);
4225__attribute__ ((__pure__)) int st_locale_insensitive_strcasecmp(const char *s1, const char *s2);
4226__attribute__ ((__pure__)) int st_locale_insensitive_strncasecmp(const char *s1, const char *s2, size_t n);
4227__attribute__ ((__pure__)) size_t st_memsize(const st_table *);
4228__attribute__ ((__pure__)) st_index_t st_hash(const void *ptr, size_t len, st_index_t h);
4229__attribute__ ((__const__)) st_index_t st_hash_uint32(st_index_t h, uint32_t i);
4230__attribute__ ((__const__)) st_index_t st_hash_uint(st_index_t h, st_index_t i);
4231__attribute__ ((__const__)) st_index_t st_hash_end(st_index_t h);
4232__attribute__ ((__const__)) st_index_t st_hash_start(st_index_t h);
4233void rb_hash_bulk_insert_into_st_table(long, const VALUE *, VALUE);
4234
4235
4236
4237
4238void rb_mem_clear(register VALUE*, register long);
4239VALUE rb_assoc_new(VALUE, VALUE);
4240VALUE rb_check_array_type(VALUE);
4241VALUE rb_ary_new(void);
4242VALUE rb_ary_new_capa(long capa);
4243VALUE rb_ary_new_from_args(long n, ...);
4244VALUE rb_ary_new_from_values(long n, const VALUE *elts);
4245VALUE rb_ary_tmp_new(long);
4246void rb_ary_free(VALUE);
4247void rb_ary_modify(VALUE);
4248VALUE rb_ary_freeze(VALUE);
4249VALUE rb_ary_shared_with_p(VALUE, VALUE);
4250VALUE rb_ary_aref(int, const VALUE*, VALUE);
4251VALUE rb_ary_subseq(VALUE, long, long);
4252void rb_ary_store(VALUE, long, VALUE);
4253VALUE rb_ary_dup(VALUE);
4254VALUE rb_ary_resurrect(VALUE ary);
4255VALUE rb_ary_to_ary(VALUE);
4256VALUE rb_ary_to_s(VALUE);
4257VALUE rb_ary_cat(VALUE, const VALUE *, long);
4258VALUE rb_ary_push(VALUE, VALUE);
4259VALUE rb_ary_pop(VALUE);
4260VALUE rb_ary_shift(VALUE);
4261VALUE rb_ary_unshift(VALUE, VALUE);
4262VALUE rb_ary_entry(VALUE, long);
4263VALUE rb_ary_each(VALUE);
4264VALUE rb_ary_join(VALUE, VALUE);
4265VALUE rb_ary_reverse(VALUE);
4266VALUE rb_ary_rotate(VALUE, long);
4267VALUE rb_ary_sort(VALUE);
4268VALUE rb_ary_sort_bang(VALUE);
4269VALUE rb_ary_delete(VALUE, VALUE);
4270VALUE rb_ary_delete_at(VALUE, long);
4271VALUE rb_ary_clear(VALUE);
4272VALUE rb_ary_plus(VALUE, VALUE);
4273VALUE rb_ary_concat(VALUE, VALUE);
4274VALUE rb_ary_assoc(VALUE, VALUE);
4275VALUE rb_ary_rassoc(VALUE, VALUE);
4276VALUE rb_ary_includes(VALUE, VALUE);
4277VALUE rb_ary_cmp(VALUE, VALUE);
4278VALUE rb_ary_replace(VALUE copy, VALUE orig);
4279VALUE rb_get_values_at(VALUE, long, int, const VALUE*, VALUE(*)(VALUE,long));
4280VALUE rb_ary_resize(VALUE ary, long len);
4281VALUE rb_big_new(size_t, int);
4282int rb_bigzero_p(VALUE x);
4283VALUE rb_big_clone(VALUE);
4284void rb_big_2comp(VALUE);
4285VALUE rb_big_norm(VALUE);
4286void rb_big_resize(VALUE big, size_t len);
4287VALUE rb_cstr_to_inum(const char*, int, int);
4288VALUE rb_str_to_inum(VALUE, int, int);
4289VALUE rb_cstr2inum(const char*, int);
4290VALUE rb_str2inum(VALUE, int);
4291VALUE rb_big2str(VALUE, int);
4292long rb_big2long(VALUE);
4293unsigned long rb_big2ulong(VALUE);
4294long long rb_big2ll(VALUE);
4295unsigned long long rb_big2ull(VALUE);
4296void rb_big_pack(VALUE val, unsigned long *buf, long num_longs);
4297VALUE rb_big_unpack(unsigned long *buf, long num_longs);
4298int rb_uv_to_utf8(char[6],unsigned long);
4299VALUE rb_dbl2big(double);
4300double rb_big2dbl(VALUE);
4301VALUE rb_big_cmp(VALUE, VALUE);
4302VALUE rb_big_eq(VALUE, VALUE);
4303VALUE rb_big_eql(VALUE, VALUE);
4304VALUE rb_big_plus(VALUE, VALUE);
4305VALUE rb_big_minus(VALUE, VALUE);
4306VALUE rb_big_mul(VALUE, VALUE);
4307VALUE rb_big_div(VALUE, VALUE);
4308VALUE rb_big_idiv(VALUE, VALUE);
4309VALUE rb_big_modulo(VALUE, VALUE);
4310VALUE rb_big_divmod(VALUE, VALUE);
4311VALUE rb_big_pow(VALUE, VALUE);
4312VALUE rb_big_and(VALUE, VALUE);
4313VALUE rb_big_or(VALUE, VALUE);
4314VALUE rb_big_xor(VALUE, VALUE);
4315VALUE rb_big_lshift(VALUE, VALUE);
4316VALUE rb_big_rshift(VALUE, VALUE);
4317int rb_integer_pack(VALUE val, void *words, size_t numwords, size_t wordsize, size_t nails, int flags);
4318VALUE rb_integer_unpack(const void *words, size_t numwords, size_t wordsize, size_t nails, int flags);
4319size_t rb_absint_size(VALUE val, int *nlz_bits_ret);
4320size_t rb_absint_numwords(VALUE val, size_t word_numbits, size_t *nlz_bits_ret);
4321int rb_absint_singlebit_p(VALUE val);
4322VALUE rb_rational_raw(VALUE, VALUE);
4323VALUE rb_rational_new(VALUE, VALUE);
4324VALUE rb_Rational(VALUE, VALUE);
4325VALUE rb_rational_num(VALUE rat);
4326VALUE rb_rational_den(VALUE rat);
4327VALUE rb_flt_rationalize_with_prec(VALUE, VALUE);
4328VALUE rb_flt_rationalize(VALUE);
4329VALUE rb_complex_raw(VALUE, VALUE);
4330VALUE rb_complex_new(VALUE, VALUE);
4331VALUE rb_complex_new_polar(VALUE abs, VALUE arg);
4332__attribute__ ((__deprecated__("by ""rb_complex_new_polar"))) VALUE rb_complex_polar(VALUE abs, VALUE arg);
4333VALUE rb_complex_real(VALUE z);
4334VALUE rb_complex_imag(VALUE z);
4335VALUE rb_complex_plus(VALUE x, VALUE y);
4336VALUE rb_complex_minus(VALUE x, VALUE y);
4337VALUE rb_complex_mul(VALUE x, VALUE y);
4338VALUE rb_complex_div(VALUE x, VALUE y);
4339VALUE rb_complex_uminus(VALUE z);
4340VALUE rb_complex_conjugate(VALUE z);
4341VALUE rb_complex_abs(VALUE z);
4342VALUE rb_complex_arg(VALUE z);
4343VALUE rb_complex_pow(VALUE base, VALUE exp);
4344VALUE rb_dbl_complex_new(double real, double imag);
4345VALUE rb_Complex(VALUE, VALUE);
4346VALUE rb_class_new(VALUE);
4347VALUE rb_mod_init_copy(VALUE, VALUE);
4348VALUE rb_singleton_class_clone(VALUE);
4349void rb_singleton_class_attached(VALUE,VALUE);
4350void rb_check_inheritable(VALUE);
4351VALUE rb_define_class_id(ID, VALUE);
4352VALUE rb_define_class_id_under(VALUE, ID, VALUE);
4353VALUE rb_module_new(void);
4354VALUE rb_define_module_id(ID);
4355VALUE rb_define_module_id_under(VALUE, ID);
4356VALUE rb_mod_included_modules(VALUE);
4357VALUE rb_mod_include_p(VALUE, VALUE);
4358VALUE rb_mod_ancestors(VALUE);
4359VALUE rb_class_instance_methods(int, const VALUE*, VALUE);
4360VALUE rb_class_public_instance_methods(int, const VALUE*, VALUE);
4361VALUE rb_class_protected_instance_methods(int, const VALUE*, VALUE);
4362VALUE rb_class_private_instance_methods(int, const VALUE*, VALUE);
4363VALUE rb_obj_singleton_methods(int, const VALUE*, VALUE);
4364void rb_define_method_id(VALUE, ID, VALUE (*)(), int);
4365void rb_undef(VALUE, ID);
4366void rb_define_protected_method(VALUE, const char*, VALUE (*)(), int);
4367void rb_define_private_method(VALUE, const char*, VALUE (*)(), int);
4368void rb_define_singleton_method(VALUE, const char*, VALUE(*)(), int);
4369VALUE rb_singleton_class(VALUE);
4370int rb_cmpint(VALUE, VALUE, VALUE);
4371__attribute__ ((__noreturn__)) void rb_cmperr(VALUE, VALUE);
4372VALUE rb_fiber_new(VALUE (*)(), VALUE);
4373VALUE rb_fiber_resume(VALUE fib, int argc, const VALUE *argv);
4374VALUE rb_fiber_yield(int argc, const VALUE *argv);
4375VALUE rb_fiber_current(void);
4376VALUE rb_fiber_alive_p(VALUE);
4377VALUE rb_enum_values_pack(int, const VALUE*);
4378VALUE rb_enumeratorize(VALUE, VALUE, int, const VALUE *);
4379typedef VALUE rb_enumerator_size_func(VALUE, VALUE, VALUE);
4380VALUE rb_enumeratorize_with_size(VALUE, VALUE, int, const VALUE *, rb_enumerator_size_func *);
4381typedef struct {
4382 VALUE begin;
4383 VALUE end;
4384 VALUE step;
4388VALUE rb_exc_new(VALUE, const char*, long);
4389VALUE rb_exc_new_cstr(VALUE, const char*);
4390VALUE rb_exc_new_str(VALUE, VALUE);
4391__attribute__ ((__noreturn__)) void rb_loaderror(const char*, ...) __attribute__((format(printf, 1, 2)));
4392__attribute__ ((__noreturn__)) void rb_loaderror_with_path(VALUE path, const char*, ...) __attribute__((format(printf, 2, 3)));
4393__attribute__ ((__noreturn__)) void rb_name_error(ID, const char*, ...) __attribute__((format(printf, 2, 3)));
4394__attribute__ ((__noreturn__)) void rb_name_error_str(VALUE, const char*, ...) __attribute__((format(printf, 2, 3)));
4395__attribute__ ((__noreturn__)) void rb_invalid_str(const char*, const char*);
4396__attribute__ ((__noreturn__)) void rb_error_frozen(const char*);
4397__attribute__ ((__noreturn__)) void rb_error_frozen_object(VALUE);
4398void rb_error_untrusted(VALUE);
4399void rb_check_frozen(VALUE);
4400void rb_check_trusted(VALUE);
4401void rb_check_copyable(VALUE obj, VALUE orig);
4402int rb_sourceline(void);
4403const char *rb_sourcefile(void);
4404VALUE rb_check_funcall(VALUE, ID, int, const VALUE*);
4405__attribute__ ((__noreturn__)) static void rb_error_arity(int, int, int);
4406static inline int
4407rb_check_arity(int argc, int min, int max)
4408{
4409 if ((argc < min) || (max != (-1) && argc > max))
4410 rb_error_arity(argc, min, max);
4411 return argc;
4412}
4413typedef struct {
4416} rb_fdset_t;
4417void rb_fd_init(rb_fdset_t *);
4418void rb_fd_term(rb_fdset_t *);
4419void rb_fd_zero(rb_fdset_t *);
4420void rb_fd_set(int, rb_fdset_t *);
4421void rb_fd_clr(int, rb_fdset_t *);
4422int rb_fd_isset(int, const rb_fdset_t *);
4423void rb_fd_copy(rb_fdset_t *, const fd_set *, int);
4424void rb_fd_dup(rb_fdset_t *dst, const rb_fdset_t *src);
4425struct timeval;
4426int rb_fd_select(int, rb_fdset_t *, rb_fdset_t *, rb_fdset_t *, struct timeval *);
4427__attribute__ ((__noreturn__)) void rb_exc_raise(VALUE);
4428__attribute__ ((__noreturn__)) void rb_exc_fatal(VALUE);
4429__attribute__ ((__noreturn__)) VALUE rb_f_exit(int, const VALUE*);
4430__attribute__ ((__noreturn__)) VALUE rb_f_abort(int, const VALUE*);
4431void rb_remove_method(VALUE, const char*);
4432void rb_remove_method_id(VALUE, ID);
4433typedef VALUE (*rb_alloc_func_t)(VALUE);
4435void rb_undef_alloc_func(VALUE);
4437void rb_clear_constant_cache(void);
4438void rb_clear_method_cache_by_class(VALUE);
4439void rb_alias(VALUE, ID, ID);
4440void rb_attr(VALUE,ID,int,int,int);
4441int rb_method_boundp(VALUE, ID, int);
4442int rb_method_basic_definition_p(VALUE, ID);
4443VALUE rb_eval_cmd(VALUE, VALUE, int);
4444int rb_obj_respond_to(VALUE, ID, int);
4445int rb_respond_to(VALUE, ID);
4446__attribute__ ((__noreturn__)) VALUE rb_f_notimplement(int argc, const VALUE *argv, VALUE obj);
4447__attribute__ ((__noreturn__)) void rb_interrupt(void);
4448VALUE rb_apply(VALUE, ID, VALUE);
4449void rb_backtrace(void);
4450ID rb_frame_this_func(void);
4451VALUE rb_obj_instance_eval(int, const VALUE*, VALUE);
4452VALUE rb_obj_instance_exec(int, const VALUE*, VALUE);
4453VALUE rb_mod_module_eval(int, const VALUE*, VALUE);
4454VALUE rb_mod_module_exec(int, const VALUE*, VALUE);
4455void rb_load(VALUE, int);
4456void rb_load_protect(VALUE, int, int*);
4457__attribute__ ((__noreturn__)) void rb_jump_tag(int);
4458int rb_provided(const char*);
4459int rb_feature_provided(const char *, const char **);
4460void rb_provide(const char*);
4461VALUE rb_f_require(VALUE, VALUE);
4462VALUE rb_require_safe(VALUE, int);
4463void rb_obj_call_init(VALUE, int, const VALUE*);
4464VALUE rb_class_new_instance(int, const VALUE*, VALUE);
4465VALUE rb_block_proc(void);
4466VALUE rb_block_lambda(void);
4467VALUE rb_proc_new(VALUE (*)( ), VALUE);
4468VALUE rb_obj_is_proc(VALUE);
4469VALUE rb_proc_call(VALUE, VALUE);
4470VALUE rb_proc_call_with_block(VALUE, int argc, const VALUE *argv, VALUE);
4471int rb_proc_arity(VALUE);
4472VALUE rb_proc_lambda_p(VALUE);
4473VALUE rb_binding_new(void);
4474VALUE rb_obj_method(VALUE, VALUE);
4475VALUE rb_obj_is_method(VALUE);
4476VALUE rb_method_call(int, const VALUE*, VALUE);
4477VALUE rb_method_call_with_block(int, const VALUE *, VALUE, VALUE);
4478int rb_mod_method_arity(VALUE, ID);
4479int rb_obj_method_arity(VALUE, ID);
4480VALUE rb_protect(VALUE (*)(VALUE), VALUE, int*);
4481void rb_set_end_proc(void (*)(VALUE), VALUE);
4482void rb_exec_end_proc(void);
4483void rb_thread_schedule(void);
4484void rb_thread_wait_fd(int);
4485int rb_thread_fd_writable(int);
4486void rb_thread_fd_close(int);
4487int rb_thread_alone(void);
4488void rb_thread_sleep(int);
4489void rb_thread_sleep_forever(void);
4490void rb_thread_sleep_deadly(void);
4491VALUE rb_thread_stop(void);
4492VALUE rb_thread_wakeup(VALUE);
4493VALUE rb_thread_wakeup_alive(VALUE);
4494VALUE rb_thread_run(VALUE);
4495VALUE rb_thread_kill(VALUE);
4496VALUE rb_thread_create(VALUE (*)(), void*);
4497int rb_thread_fd_select(int, rb_fdset_t *, rb_fdset_t *, rb_fdset_t *, struct timeval *);
4498void rb_thread_wait_for(struct timeval);
4499VALUE rb_thread_current(void);
4500VALUE rb_thread_main(void);
4501VALUE rb_thread_local_aref(VALUE, ID);
4502VALUE rb_thread_local_aset(VALUE, ID, VALUE);
4503void rb_thread_atfork(void);
4505VALUE rb_exec_recursive(VALUE(*)(VALUE, VALUE, int),VALUE,VALUE);
4506VALUE rb_exec_recursive_paired(VALUE(*)(VALUE, VALUE, int),VALUE,VALUE,VALUE);
4507VALUE rb_exec_recursive_outer(VALUE(*)(VALUE, VALUE, int),VALUE,VALUE);
4508VALUE rb_exec_recursive_paired_outer(VALUE(*)(VALUE, VALUE, int),VALUE,VALUE,VALUE);
4509VALUE rb_dir_getwd(void);
4510VALUE rb_file_s_expand_path(int, const VALUE *);
4511VALUE rb_file_expand_path(VALUE, VALUE);
4512VALUE rb_file_s_absolute_path(int, const VALUE *);
4513VALUE rb_file_absolute_path(VALUE, VALUE);
4514VALUE rb_file_dirname(VALUE fname);
4515int rb_find_file_ext_safe(VALUE*, const char* const*, int);
4516VALUE rb_find_file_safe(VALUE, int);
4517int rb_find_file_ext(VALUE*, const char* const*);
4518VALUE rb_find_file(VALUE);
4519VALUE rb_file_directory_p(VALUE,VALUE);
4520VALUE rb_str_encode_ospath(VALUE);
4521int rb_is_absolute_path(const char *);
4522__attribute__((cold)) __attribute__ ((__noreturn__)) void rb_memerror(void);
4523__attribute__ ((__pure__)) int rb_during_gc(void);
4524void rb_gc_mark_locations(const VALUE*, const VALUE*);
4525void rb_mark_tbl(struct st_table*);
4526void rb_mark_set(struct st_table*);
4527void rb_mark_hash(struct st_table*);
4528void rb_gc_mark_maybe(VALUE);
4529void rb_gc_mark(VALUE);
4530void rb_gc_force_recycle(VALUE);
4531void rb_gc(void);
4532void rb_gc_copy_finalizer(VALUE,VALUE);
4533void rb_gc_finalize_deferred(void);
4534void rb_gc_call_finalizer_at_exit(void);
4535VALUE rb_gc_enable(void);
4536VALUE rb_gc_disable(void);
4537VALUE rb_gc_start(void);
4538VALUE rb_define_finalizer(VALUE, VALUE);
4539VALUE rb_undefine_finalizer(VALUE);
4540size_t rb_gc_count(void);
4541size_t rb_gc_stat(VALUE);
4542VALUE rb_gc_latest_gc_info(VALUE);
4543void rb_gc_adjust_memory_usage(ssize_t);
4544void st_foreach_safe(struct st_table *, int (*)(), st_data_t);
4545VALUE rb_check_hash_type(VALUE);
4546void rb_hash_foreach(VALUE, int (*)(), VALUE);
4547VALUE rb_hash(VALUE);
4548VALUE rb_hash_new(void);
4549VALUE rb_hash_dup(VALUE);
4550VALUE rb_hash_freeze(VALUE);
4551VALUE rb_hash_aref(VALUE, VALUE);
4552VALUE rb_hash_lookup(VALUE, VALUE);
4553VALUE rb_hash_lookup2(VALUE, VALUE, VALUE);
4554VALUE rb_hash_fetch(VALUE, VALUE);
4555VALUE rb_hash_aset(VALUE, VALUE, VALUE);
4556VALUE rb_hash_clear(VALUE);
4557VALUE rb_hash_delete_if(VALUE);
4558VALUE rb_hash_delete(VALUE,VALUE);
4559VALUE rb_hash_set_ifnone(VALUE hash, VALUE ifnone);
4560typedef VALUE rb_hash_update_func(VALUE newkey, VALUE oldkey, VALUE value);
4561VALUE rb_hash_update_by(VALUE hash1, VALUE hash2, rb_hash_update_func *func);
4562struct st_table *rb_hash_tbl(VALUE, const char *file, int line);
4563int rb_path_check(const char*);
4564int rb_env_path_tainted(void);
4565VALUE rb_env_clear(void);
4566VALUE rb_hash_size(VALUE);
4567void rb_hash_free(VALUE);
4568extern VALUE rb_fs;
4569extern VALUE rb_output_fs;
4570extern VALUE rb_rs;
4571extern VALUE rb_default_rs;
4572extern VALUE rb_output_rs;
4573VALUE rb_io_write(VALUE, VALUE);
4574VALUE rb_io_gets(VALUE);
4575VALUE rb_io_getbyte(VALUE);
4576VALUE rb_io_ungetc(VALUE, VALUE);
4577VALUE rb_io_ungetbyte(VALUE, VALUE);
4578VALUE rb_io_close(VALUE);
4579VALUE rb_io_flush(VALUE);
4580VALUE rb_io_eof(VALUE);
4581VALUE rb_io_binmode(VALUE);
4582VALUE rb_io_ascii8bit_binmode(VALUE);
4583VALUE rb_io_addstr(VALUE, VALUE);
4584VALUE rb_io_printf(int, const VALUE*, VALUE);
4585VALUE rb_io_print(int, const VALUE*, VALUE);
4586VALUE rb_io_puts(int, const VALUE*, VALUE);
4587VALUE rb_io_fdopen(int, int, const char*);
4588VALUE rb_io_get_io(VALUE);
4589VALUE rb_file_open(const char*, const char*);
4590VALUE rb_file_open_str(VALUE, const char*);
4591VALUE rb_gets(void);
4592void rb_write_error(const char*);
4593void rb_write_error2(const char*, long);
4594void rb_close_before_exec(int lowfd, int maxhint, VALUE noclose_fds);
4595int rb_pipe(int *pipes);
4596int rb_reserved_fd_p(int fd);
4597int rb_cloexec_open(const char *pathname, int flags, mode_t mode);
4598int rb_cloexec_dup(int oldfd);
4599int rb_cloexec_dup2(int oldfd, int newfd);
4600int rb_cloexec_pipe(int fildes[2]);
4601int rb_cloexec_fcntl_dupfd(int fd, int minfd);
4602void rb_update_max_fd(int fd);
4603void rb_fd_fix_cloexec(int fd);
4604VALUE rb_marshal_dump(VALUE, VALUE);
4605VALUE rb_marshal_load(VALUE);
4606void rb_marshal_define_compat(VALUE newclass, VALUE oldclass, VALUE (*dumper)(VALUE), VALUE (*loader)(VALUE, VALUE));
4607__attribute__ ((__noreturn__)) void rb_num_zerodiv(void);
4608VALUE rb_num_coerce_bin(VALUE, VALUE, ID);
4609VALUE rb_num_coerce_cmp(VALUE, VALUE, ID);
4610VALUE rb_num_coerce_relop(VALUE, VALUE, ID);
4611VALUE rb_num_coerce_bit(VALUE, VALUE, ID);
4612VALUE rb_num2fix(VALUE);
4613VALUE rb_fix2str(VALUE, int);
4614__attribute__ ((__const__)) VALUE rb_dbl_cmp(double, double);
4615int rb_eql(VALUE, VALUE);
4616VALUE rb_any_to_s(VALUE);
4617VALUE rb_inspect(VALUE);
4618VALUE rb_obj_is_instance_of(VALUE, VALUE);
4619VALUE rb_obj_is_kind_of(VALUE, VALUE);
4620VALUE rb_obj_alloc(VALUE);
4621VALUE rb_obj_clone(VALUE);
4622VALUE rb_obj_dup(VALUE);
4623VALUE rb_obj_init_copy(VALUE,VALUE);
4624VALUE rb_obj_taint(VALUE);
4625__attribute__ ((__pure__)) VALUE rb_obj_tainted(VALUE);
4626VALUE rb_obj_untaint(VALUE);
4627VALUE rb_obj_untrust(VALUE);
4628__attribute__ ((__pure__)) VALUE rb_obj_untrusted(VALUE);
4629VALUE rb_obj_trust(VALUE);
4630VALUE rb_obj_freeze(VALUE);
4631__attribute__ ((__pure__)) VALUE rb_obj_frozen_p(VALUE);
4632VALUE rb_obj_id(VALUE);
4633VALUE rb_obj_class(VALUE);
4634__attribute__ ((__pure__)) VALUE rb_class_real(VALUE);
4635__attribute__ ((__pure__)) VALUE rb_class_inherited_p(VALUE, VALUE);
4636VALUE rb_class_superclass(VALUE);
4637VALUE rb_class_get_superclass(VALUE);
4638VALUE rb_convert_type(VALUE,int,const char*,const char*);
4639VALUE rb_check_convert_type(VALUE,int,const char*,const char*);
4640VALUE rb_check_to_integer(VALUE, const char *);
4641VALUE rb_check_to_float(VALUE);
4642VALUE rb_to_int(VALUE);
4643VALUE rb_check_to_int(VALUE);
4644VALUE rb_Integer(VALUE);
4645VALUE rb_to_float(VALUE);
4646VALUE rb_Float(VALUE);
4647VALUE rb_String(VALUE);
4648VALUE rb_Array(VALUE);
4649VALUE rb_Hash(VALUE);
4650double rb_cstr_to_dbl(const char*, int);
4651double rb_str_to_dbl(VALUE, int);
4652ID rb_id_attrset(ID);
4653__attribute__ ((__const__)) int rb_is_const_id(ID);
4654__attribute__ ((__const__)) int rb_is_global_id(ID);
4655__attribute__ ((__const__)) int rb_is_instance_id(ID);
4656__attribute__ ((__const__)) int rb_is_attrset_id(ID);
4657__attribute__ ((__const__)) int rb_is_class_id(ID);
4658__attribute__ ((__const__)) int rb_is_local_id(ID);
4659__attribute__ ((__const__)) int rb_is_junk_id(ID);
4660int rb_symname_p(const char*);
4661int rb_sym_interned_p(VALUE);
4662VALUE rb_backref_get(void);
4663void rb_backref_set(VALUE);
4664VALUE rb_lastline_get(void);
4665void rb_lastline_set(VALUE);
4666void rb_last_status_set(int status, pid_t pid);
4667VALUE rb_last_status_get(void);
4668int rb_proc_exec(const char*);
4669__attribute__ ((__noreturn__)) VALUE rb_f_exec(int, const VALUE*);
4670pid_t rb_waitpid(pid_t pid, int *status, int flags);
4671void rb_syswait(pid_t pid);
4672pid_t rb_spawn(int, const VALUE*);
4673pid_t rb_spawn_err(int, const VALUE*, char*, size_t);
4674VALUE rb_proc_times(VALUE);
4675VALUE rb_detach_process(pid_t pid);
4676VALUE rb_range_new(VALUE, VALUE, int);
4677VALUE rb_range_beg_len(VALUE, long*, long*, long, int);
4678int rb_range_values(VALUE range, VALUE *begp, VALUE *endp, int *exclp);
4679unsigned int rb_genrand_int32(void);
4680double rb_genrand_real(void);
4681void rb_reset_random_seed(void);
4682VALUE rb_random_bytes(VALUE rnd, long n);
4683VALUE rb_random_int(VALUE rnd, VALUE max);
4684unsigned int rb_random_int32(VALUE rnd);
4685double rb_random_real(VALUE rnd);
4686unsigned long rb_random_ulong_limited(VALUE rnd, unsigned long limit);
4687unsigned long rb_genrand_ulong_limited(unsigned long i);
4688int rb_memcicmp(const void*,const void*,long);
4689void rb_match_busy(VALUE);
4690VALUE rb_reg_nth_defined(int, VALUE);
4691VALUE rb_reg_nth_match(int, VALUE);
4692int rb_reg_backref_number(VALUE match, VALUE backref);
4693VALUE rb_reg_last_match(VALUE);
4694VALUE rb_reg_match_pre(VALUE);
4695VALUE rb_reg_match_post(VALUE);
4696VALUE rb_reg_match_last(VALUE);
4697VALUE rb_reg_new_str(VALUE, int);
4698VALUE rb_reg_new(const char *, long, int);
4699VALUE rb_reg_alloc(void);
4700VALUE rb_reg_init_str(VALUE re, VALUE s, int options);
4701VALUE rb_reg_match(VALUE, VALUE);
4702VALUE rb_reg_match2(VALUE);
4703int rb_reg_options(VALUE);
4704extern VALUE rb_argv0;
4705VALUE rb_get_argv(void);
4706void *rb_load_file(const char*);
4707void *rb_load_file_str(VALUE);
4708VALUE rb_f_kill(int, const VALUE*);
4709void (*ruby_posix_signal(int, void (*)(int)))(int);
4710void rb_trap_exit(void);
4711void rb_trap_exec(void);
4712const char *ruby_signal_name(int);
4713void ruby_default_signal(int);
4714VALUE rb_f_sprintf(int, const VALUE*);
4715VALUE rb_sprintf(const char*, ...) __attribute__((format(printf, 1, 2)));
4716VALUE rb_vsprintf(const char*, va_list);
4717VALUE rb_str_catf(VALUE, const char*, ...) __attribute__((format(printf, 2, 3)));
4718VALUE rb_str_vcatf(VALUE, const char*, va_list);
4719VALUE rb_str_format(int, const VALUE *, VALUE);
4720VALUE rb_str_new(const char*, long);
4721VALUE rb_str_new_cstr(const char*);
4722VALUE rb_str_new_shared(VALUE);
4723VALUE rb_str_new_frozen(VALUE);
4724VALUE rb_str_new_with_class(VALUE, const char*, long);
4725VALUE rb_tainted_str_new_cstr(const char*);
4726VALUE rb_tainted_str_new(const char*, long);
4727VALUE rb_external_str_new(const char*, long);
4728VALUE rb_external_str_new_cstr(const char*);
4729VALUE rb_locale_str_new(const char*, long);
4730VALUE rb_locale_str_new_cstr(const char*);
4731VALUE rb_filesystem_str_new(const char*, long);
4732VALUE rb_filesystem_str_new_cstr(const char*);
4733VALUE rb_str_buf_new(long);
4734VALUE rb_str_buf_new_cstr(const char*);
4735VALUE rb_str_buf_new2(const char*);
4736VALUE rb_str_tmp_new(long);
4737VALUE rb_usascii_str_new(const char*, long);
4738VALUE rb_usascii_str_new_cstr(const char*);
4739VALUE rb_utf8_str_new(const char*, long);
4740VALUE rb_utf8_str_new_cstr(const char*);
4741VALUE rb_str_new_static(const char *, long);
4742VALUE rb_usascii_str_new_static(const char *, long);
4743VALUE rb_utf8_str_new_static(const char *, long);
4744void rb_str_free(VALUE);
4745void rb_str_shared_replace(VALUE, VALUE);
4746VALUE rb_str_buf_append(VALUE, VALUE);
4747VALUE rb_str_buf_cat(VALUE, const char*, long);
4748VALUE rb_str_buf_cat2(VALUE, const char*);
4749VALUE rb_str_buf_cat_ascii(VALUE, const char*);
4750VALUE rb_obj_as_string(VALUE);
4751VALUE rb_check_string_type(VALUE);
4752void rb_must_asciicompat(VALUE);
4753VALUE rb_str_dup(VALUE);
4754VALUE rb_str_resurrect(VALUE str);
4755VALUE rb_str_locktmp(VALUE);
4756VALUE rb_str_unlocktmp(VALUE);
4757VALUE rb_str_dup_frozen(VALUE);
4758VALUE rb_str_plus(VALUE, VALUE);
4759VALUE rb_str_times(VALUE, VALUE);
4760long rb_str_sublen(VALUE, long);
4761VALUE rb_str_substr(VALUE, long, long);
4762VALUE rb_str_subseq(VALUE, long, long);
4763char *rb_str_subpos(VALUE, long, long*);
4764void rb_str_modify(VALUE);
4765void rb_str_modify_expand(VALUE, long);
4766VALUE rb_str_freeze(VALUE);
4767void rb_str_set_len(VALUE, long);
4768VALUE rb_str_resize(VALUE, long);
4769VALUE rb_str_cat(VALUE, const char*, long);
4770VALUE rb_str_cat_cstr(VALUE, const char*);
4771VALUE rb_str_cat2(VALUE, const char*);
4772VALUE rb_str_append(VALUE, VALUE);
4773VALUE rb_str_concat(VALUE, VALUE);
4774st_index_t rb_memhash(const void *ptr, long len);
4775st_index_t rb_hash_start(st_index_t);
4776st_index_t rb_hash_uint32(st_index_t, uint32_t);
4777st_index_t rb_hash_uint(st_index_t, st_index_t);
4778st_index_t rb_hash_end(st_index_t);
4779st_index_t rb_str_hash(VALUE);
4780int rb_str_hash_cmp(VALUE,VALUE);
4781int rb_str_comparable(VALUE, VALUE);
4782int rb_str_cmp(VALUE, VALUE);
4783VALUE rb_str_equal(VALUE str1, VALUE str2);
4784VALUE rb_str_drop_bytes(VALUE, long);
4785void rb_str_update(VALUE, long, long, VALUE);
4786VALUE rb_str_replace(VALUE, VALUE);
4787VALUE rb_str_inspect(VALUE);
4788VALUE rb_str_dump(VALUE);
4789VALUE rb_str_split(VALUE, const char*);
4790void rb_str_setter(VALUE, ID, VALUE*);
4791VALUE rb_str_intern(VALUE);
4792VALUE rb_sym_to_s(VALUE);
4793long rb_str_strlen(VALUE);
4794VALUE rb_str_length(VALUE);
4795long rb_str_offset(VALUE, long);
4796__attribute__ ((__pure__)) size_t rb_str_capacity(VALUE);
4797VALUE rb_str_ellipsize(VALUE, long);
4798VALUE rb_str_scrub(VALUE, VALUE);
4799VALUE rb_sym_all_symbols(void);
4800VALUE rb_struct_new(VALUE, ...);
4801VALUE rb_struct_define(const char*, ...);
4802VALUE rb_struct_define_under(VALUE, const char*, ...);
4803VALUE rb_struct_alloc(VALUE, VALUE);
4804VALUE rb_struct_initialize(VALUE, VALUE);
4805VALUE rb_struct_aref(VALUE, VALUE);
4806VALUE rb_struct_aset(VALUE, VALUE, VALUE);
4807VALUE rb_struct_getmember(VALUE, ID);
4808VALUE rb_struct_s_members(VALUE);
4809VALUE rb_struct_members(VALUE);
4810VALUE rb_struct_size(VALUE s);
4811VALUE rb_struct_alloc_noinit(VALUE);
4812VALUE rb_struct_define_without_accessor(const char *, VALUE, rb_alloc_func_t, ...);
4813VALUE rb_struct_define_without_accessor_under(VALUE outer, const char *class_name, VALUE super, rb_alloc_func_t alloc, ...);
4814typedef void rb_unblock_function_t(void *);
4815typedef VALUE rb_blocking_function_t(void *);
4816void rb_thread_check_ints(void);
4817int rb_thread_interrupted(VALUE thval);
4818VALUE rb_mutex_new(void);
4819VALUE rb_mutex_locked_p(VALUE mutex);
4820VALUE rb_mutex_trylock(VALUE mutex);
4821VALUE rb_mutex_lock(VALUE mutex);
4822VALUE rb_mutex_unlock(VALUE mutex);
4823VALUE rb_mutex_sleep(VALUE self, VALUE timeout);
4824VALUE rb_mutex_synchronize(VALUE mutex, VALUE (*func)(VALUE arg), VALUE arg);
4825void rb_timespec_now(struct timespec *);
4826VALUE rb_time_new(time_t, long);
4827VALUE rb_time_nano_new(time_t, long);
4828VALUE rb_time_timespec_new(const struct timespec *, int);
4829VALUE rb_time_num_new(VALUE, VALUE);
4830struct timeval rb_time_interval(VALUE num);
4831struct timeval rb_time_timeval(VALUE time);
4832struct timespec rb_time_timespec(VALUE time);
4833VALUE rb_time_utc_offset(VALUE time);
4834VALUE rb_mod_name(VALUE);
4835VALUE rb_class_path(VALUE);
4836VALUE rb_class_path_cached(VALUE);
4837void rb_set_class_path(VALUE, VALUE, const char*);
4838void rb_set_class_path_string(VALUE, VALUE, VALUE);
4839VALUE rb_path_to_class(VALUE);
4840VALUE rb_path2class(const char*);
4841void rb_name_class(VALUE, ID);
4842VALUE rb_class_name(VALUE);
4843VALUE rb_autoload_load(VALUE, ID);
4844VALUE rb_autoload_p(VALUE, ID);
4845VALUE rb_f_trace_var(int, const VALUE*);
4846VALUE rb_f_untrace_var(int, const VALUE*);
4847VALUE rb_f_global_variables(void);
4848void rb_alias_variable(ID, ID);
4849void rb_copy_generic_ivar(VALUE,VALUE);
4850void rb_free_generic_ivar(VALUE);
4851VALUE rb_ivar_get(VALUE, ID);
4852VALUE rb_ivar_set(VALUE, ID, VALUE);
4853VALUE rb_ivar_defined(VALUE, ID);
4854void rb_ivar_foreach(VALUE, int (*)(), st_data_t);
4855st_index_t rb_ivar_count(VALUE);
4856VALUE rb_attr_get(VALUE, ID);
4857VALUE rb_obj_instance_variables(VALUE);
4858VALUE rb_obj_remove_instance_variable(VALUE, VALUE);
4859void *rb_mod_const_at(VALUE, void*);
4860void *rb_mod_const_of(VALUE, void*);
4861VALUE rb_const_list(void*);
4862VALUE rb_mod_constants(int, const VALUE *, VALUE);
4863VALUE rb_mod_remove_const(VALUE, VALUE);
4864int rb_const_defined(VALUE, ID);
4865int rb_const_defined_at(VALUE, ID);
4866int rb_const_defined_from(VALUE, ID);
4867VALUE rb_const_get(VALUE, ID);
4868VALUE rb_const_get_at(VALUE, ID);
4869VALUE rb_const_get_from(VALUE, ID);
4870void rb_const_set(VALUE, ID, VALUE);
4871VALUE rb_const_remove(VALUE, ID);
4872VALUE rb_cvar_defined(VALUE, ID);
4873void rb_cvar_set(VALUE, ID, VALUE);
4874VALUE rb_cvar_get(VALUE, ID);
4875void rb_cv_set(VALUE, const char*, VALUE);
4876VALUE rb_cv_get(VALUE, const char*);
4877void rb_define_class_variable(VALUE, const char*, VALUE);
4878VALUE rb_mod_class_variables(int, const VALUE*, VALUE);
4879VALUE rb_mod_remove_cvar(VALUE, VALUE);
4880ID rb_frame_callee(void);
4881int rb_frame_method_id_and_class(ID *idp, VALUE *klassp);
4882VALUE rb_str_succ(VALUE);
4883VALUE rb_time_succ(VALUE);
4884VALUE rb_make_backtrace(void);
4885VALUE rb_make_exception(int, const VALUE*);
4886
4887
4888static inline void
4889rb_clone_setup(VALUE clone, VALUE obj)
4890{
4891 rb_obj_setup(clone, rb_singleton_class_clone(obj),
4892 ((struct RBasic*)(obj))->flags & ~(((VALUE)RUBY_FL_PROMOTED0)|((VALUE)RUBY_FL_PROMOTED1)|((VALUE)RUBY_FL_FINALIZE)));
4893 rb_singleton_class_attached((((struct RBasic*)(clone))->klass), clone);
4894 if (((!(((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(obj))->flags & RUBY_T_MASK) != RUBY_T_NODE)?(((struct RBasic*)((obj)))->flags&((RUBY_FL_EXIVAR))):0)) rb_copy_generic_ivar(clone, obj);
4895}
4896static inline void
4897rb_dup_setup(VALUE dup, VALUE obj)
4898{
4899 rb_obj_setup(dup, rb_obj_class(obj), (((struct RBasic*)(obj))->flags&(RUBY_FL_DUPPED)));
4900 if (((!(((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(obj))->flags & RUBY_T_MASK) != RUBY_T_NODE)?(((struct RBasic*)((obj)))->flags&((RUBY_FL_EXIVAR))):0)) rb_copy_generic_ivar(dup, obj);
4901}
4902static inline long
4903rb_array_len(VALUE a)
4904{
4905 return (((struct RBasic*)(a))->flags & (VALUE)RARRAY_EMBED_FLAG) ?
4906 (long)((((struct RBasic*)(a))->flags >> RARRAY_EMBED_LEN_SHIFT) & ((VALUE)RARRAY_EMBED_LEN_MASK >> RARRAY_EMBED_LEN_SHIFT)) : ((struct RArray*)(a))->as.heap.len;
4907}
4908static inline const VALUE *
4909rb_array_const_ptr_transient(VALUE a)
4910{
4911 return ((((struct RBasic*)(a))->flags & (VALUE)RARRAY_EMBED_FLAG) ? ((struct RArray*)(a))->as.ary : ((struct RArray*)(a))->as.heap.ptr);
4912}
4913static inline const VALUE *
4914rb_array_const_ptr(VALUE a)
4915{
4916 void rb_ary_detransient(VALUE a);
4917 if ((((struct RBasic*)((a)))->flags&(RARRAY_TRANSIENT_FLAG))) {
4919 }
4920 return rb_array_const_ptr_transient(a);
4921}
4922static inline VALUE *
4923rb_array_ptr_use_start(VALUE a, int allow_transient)
4924{
4925 VALUE *rb_ary_ptr_use_start(VALUE ary);
4926 if (!allow_transient) {
4927 if ((((struct RBasic*)((a)))->flags&(RARRAY_TRANSIENT_FLAG))) {
4928 void rb_ary_detransient(VALUE a);
4930 }
4931 }
4932 return rb_ary_ptr_use_start(a);
4933}
4934static inline void
4935rb_array_ptr_use_end(VALUE a, int allow_transient)
4936{
4937 void rb_ary_ptr_use_end(VALUE a);
4938 rb_ary_ptr_use_end(a);
4939}
4940int ruby_native_thread_p(void);
4941typedef uint32_t rb_event_flag_t;
4942typedef void (*rb_event_hook_func_t)(rb_event_flag_t evflag, VALUE data, VALUE self, ID mid, VALUE klass);
4943void rb_add_event_hook(rb_event_hook_func_t func, rb_event_flag_t events, VALUE data);
4945static inline int rb_isascii(int c){ return '\0' <= c && c <= '\x7f'; }
4946static inline int rb_isupper(int c){ return 'A' <= c && c <= 'Z'; }
4947static inline int rb_islower(int c){ return 'a' <= c && c <= 'z'; }
4948static inline int rb_isalpha(int c){ return rb_isupper(c) || rb_islower(c); }
4949static inline int rb_isdigit(int c){ return '0' <= c && c <= '9'; }
4950static inline int rb_isalnum(int c){ return rb_isalpha(c) || rb_isdigit(c); }
4951static inline int rb_isxdigit(int c){ return rb_isdigit(c) || ('A' <= c && c <= 'F') || ('a' <= c && c <= 'f'); }
4952static inline int rb_isblank(int c){ return c == ' ' || c == '\t'; }
4953static inline int rb_isspace(int c){ return c == ' ' || ('\t' <= c && c <= '\r'); }
4954static inline int rb_iscntrl(int c){ return ('\0' <= c && c < ' ') || c == '\x7f'; }
4955static inline int rb_isprint(int c){ return ' ' <= c && c <= '\x7e'; }
4956static inline int rb_ispunct(int c){ return !rb_isalnum(c); }
4957static inline int rb_isgraph(int c){ return '!' <= c && c <= '\x7e'; }
4958static inline int rb_tolower(int c) { return rb_isupper(c) ? (c|0x20) : c; }
4959static inline int rb_toupper(int c) { return rb_islower(c) ? (c&0x5f) : c; }
4960int st_locale_insensitive_strcasecmp(const char *s1, const char *s2);
4961int st_locale_insensitive_strncasecmp(const char *s1, const char *s2, size_t n);
4962unsigned long ruby_strtoul(const char *str, char **endptr, int base);
4963int ruby_snprintf(char *str, size_t n, char const *fmt, ...) __attribute__((format(printf, 3, 4)));
4964int ruby_vsnprintf(char *str, size_t n, char const *fmt, va_list ap);
4965__attribute__ ((__error__ ("bad scan arg format"))) int rb_scan_args_bad_format(const char*);
4966__attribute__ ((__error__ ("variable argument length doesn't match"))) int rb_scan_args_length_mismatch(const char*,int);
4967__attribute__ ((__always_inline__)) static int rb_scan_args_lead_p(const char *fmt);
4968static inline int
4969rb_scan_args_lead_p(const char *fmt)
4970{
4971 return ((unsigned char)((fmt[0])-'0')<10);
4972}
4973__attribute__ ((__always_inline__)) static int rb_scan_args_n_lead(const char *fmt);
4974static inline int
4975rb_scan_args_n_lead(const char *fmt)
4976{
4977 return (rb_scan_args_lead_p(fmt) ? fmt[0]-'0' : 0);
4978}
4979__attribute__ ((__always_inline__)) static int rb_scan_args_opt_p(const char *fmt);
4980static inline int
4981rb_scan_args_opt_p(const char *fmt)
4982{
4983 return (rb_scan_args_lead_p(fmt) && ((unsigned char)((fmt[1])-'0')<10));
4984}
4985__attribute__ ((__always_inline__)) static int rb_scan_args_n_opt(const char *fmt);
4986static inline int
4987rb_scan_args_n_opt(const char *fmt)
4988{
4989 return (rb_scan_args_opt_p(fmt) ? fmt[1]-'0' : 0);
4990}
4991__attribute__ ((__always_inline__)) static int rb_scan_args_var_idx(const char *fmt);
4992static inline int
4993rb_scan_args_var_idx(const char *fmt)
4994{
4995 return (!rb_scan_args_lead_p(fmt) ? 0 : !((unsigned char)((fmt[1])-'0')<10) ? 1 : 2);
4996}
4997__attribute__ ((__always_inline__)) static int rb_scan_args_f_var(const char *fmt);
4998static inline int
4999rb_scan_args_f_var(const char *fmt)
5000{
5001 return (fmt[rb_scan_args_var_idx(fmt)]=='*');
5002}
5003__attribute__ ((__always_inline__)) static int rb_scan_args_trail_idx(const char *fmt);
5004static inline int
5005rb_scan_args_trail_idx(const char *fmt)
5006{
5007 const int idx = rb_scan_args_var_idx(fmt);
5008 return idx+(fmt[idx]=='*');
5009}
5010__attribute__ ((__always_inline__)) static int rb_scan_args_n_trail(const char *fmt);
5011static inline int
5012rb_scan_args_n_trail(const char *fmt)
5013{
5014 const int idx = rb_scan_args_trail_idx(fmt);
5015 return (((unsigned char)((fmt[idx])-'0')<10) ? fmt[idx]-'0' : 0);
5016}
5017__attribute__ ((__always_inline__)) static int rb_scan_args_hash_idx(const char *fmt);
5018static inline int
5019rb_scan_args_hash_idx(const char *fmt)
5020{
5021 const int idx = rb_scan_args_trail_idx(fmt);
5022 return idx+((unsigned char)((fmt[idx])-'0')<10);
5023}
5024__attribute__ ((__always_inline__)) static int rb_scan_args_f_hash(const char *fmt);
5025static inline int
5026rb_scan_args_f_hash(const char *fmt)
5027{
5028 return (fmt[rb_scan_args_hash_idx(fmt)]==':');
5029}
5030__attribute__ ((__always_inline__)) static int rb_scan_args_block_idx(const char *fmt);
5031static inline int
5032rb_scan_args_block_idx(const char *fmt)
5033{
5034 const int idx = rb_scan_args_hash_idx(fmt);
5035 return idx+(fmt[idx]==':');
5036}
5037__attribute__ ((__always_inline__)) static int rb_scan_args_f_block(const char *fmt);
5038static inline int
5039rb_scan_args_f_block(const char *fmt)
5040{
5041 return (fmt[rb_scan_args_block_idx(fmt)]=='&');
5042}static inline
5043__attribute__ ((__always_inline__)) int rb_scan_args_set(int argc, const VALUE *argv, int n_lead, int n_opt, int n_trail, int f_var, int f_hash, int f_block, VALUE *vars[], char *fmt, int varc);static inline
5044 int
5045rb_scan_args_set(int argc, const VALUE *argv,
5046 int n_lead, int n_opt, int n_trail,
5047 int f_var, int f_hash, int f_block,
5048 VALUE *vars[], char *fmt __attribute__ ((unused)), int varc __attribute__ ((unused)))
5049{
5050 int i, argi = 0, vari = 0, last_idx = -1;
5051 VALUE *var, hash = ((VALUE)RUBY_Qnil), last_hash = 0;
5052 const int n_mand = n_lead + n_trail;
5053 if (f_hash && n_mand < argc) {
5054 VALUE last = argv[argc - 1];
5055 if (!((VALUE)(last) != ((VALUE)RUBY_Qnil))) {
5056 if (!f_var && n_mand + n_opt < argc)
5057 argc--;
5058 }
5059 else {
5060 hash = rb_check_hash_type(last);
5061 if (!!((VALUE)(hash) != ((VALUE)RUBY_Qnil))) {
5062 VALUE opts = rb_extract_keywords(&hash);
5063 if (!(last_hash = hash)) argc--;
5064 else last_idx = argc - 1;
5065 hash = opts ? opts : ((VALUE)RUBY_Qnil);
5066 }
5067 }
5068 }
5069 rb_check_arity(argc, n_mand, f_var ? (-1) : n_mand + n_opt);
5070 for (i = n_lead; i-- > 0; ) {
5071 var = vars[vari++];
5072 if (var) *var = (argi == last_idx) ? last_hash : argv[argi];
5073 argi++;
5074 }
5075 for (i = n_opt; i-- > 0; ) {
5076 var = vars[vari++];
5077 if (argi < argc - n_trail) {
5078 if (var) *var = (argi == last_idx) ? last_hash : argv[argi];
5079 argi++;
5080 }
5081 else {
5082 if (var) *var = ((VALUE)RUBY_Qnil);
5083 }
5084 }
5085 if (f_var) {
5086 int n_var = argc - argi - n_trail;
5087 var = vars[vari++];
5088 if (0 < n_var) {
5089 if (var) {
5090 int f_last = (last_idx + 1 == argc - n_trail);
5091 *var = rb_ary_new_from_values(n_var-f_last, &argv[argi]);
5092 if (f_last) rb_ary_push(*var, last_hash);
5093 }
5094 argi += n_var;
5095 }
5096 else {
5097 if (var) *var = rb_ary_new();
5098 }
5099 }
5100 for (i = n_trail; i-- > 0; ) {
5101 var = vars[vari++];
5102 if (var) *var = (argi == last_idx) ? last_hash : argv[argi];
5103 argi++;
5104 }
5105 if (f_hash) {
5106 var = vars[vari++];
5107 if (var) *var = hash;
5108 }
5109 if (f_block) {
5110 var = vars[vari++];
5111 if (rb_block_given_p()) {
5112 *var = rb_block_proc();
5113 }
5114 else {
5115 *var = ((VALUE)RUBY_Qnil);
5116 }
5117 }
5118 return argc;
5119}
5120void ruby_sysinit(int *argc, char ***argv);
5121void ruby_init(void);
5122void* ruby_options(int argc, char** argv);
5123int ruby_executable_node(void *n, int *status);
5124int ruby_run_node(void *n);
5125void ruby_show_version(void);
5126void ruby_show_copyright(void);
5127void ruby_init_stack(volatile VALUE*);
5128int ruby_setup(void);
5129int ruby_cleanup(volatile int);
5130void ruby_finalize(void);
5131__attribute__ ((__noreturn__)) void ruby_stop(int);
5132void ruby_set_stack_size(size_t);
5133int ruby_stack_check(void);
5134size_t ruby_stack_length(VALUE**);
5135int ruby_exec_node(void *n);
5136void ruby_script(const char* name);
5137void ruby_set_script_name(VALUE name);
5138void ruby_prog_init(void);
5139void ruby_set_argv(int, char**);
5140void *ruby_process_options(int, char**);
5141void ruby_init_loadpath(void);
5142void ruby_incpush(const char*);
5143void ruby_sig_finalize(void);
5144
5145
5146typedef
5147 struct {
5148 unsigned long int nraddr;
5149 }
5150 OrigFn;
5151typedef
5152 enum { VG_USERREQ__RUNNING_ON_VALGRIND = 0x1001,
5153 VG_USERREQ__DISCARD_TRANSLATIONS = 0x1002,
5154 VG_USERREQ__CLIENT_CALL0 = 0x1101,
5155 VG_USERREQ__CLIENT_CALL1 = 0x1102,
5156 VG_USERREQ__CLIENT_CALL2 = 0x1103,
5157 VG_USERREQ__CLIENT_CALL3 = 0x1104,
5158 VG_USERREQ__COUNT_ERRORS = 0x1201,
5159 VG_USERREQ__GDB_MONITOR_COMMAND = 0x1202,
5160 VG_USERREQ__CLO_CHANGE = 0x1203,
5161 VG_USERREQ__MALLOCLIKE_BLOCK = 0x1301,
5162 VG_USERREQ__RESIZEINPLACE_BLOCK = 0x130b,
5163 VG_USERREQ__FREELIKE_BLOCK = 0x1302,
5164 VG_USERREQ__CREATE_MEMPOOL = 0x1303,
5165 VG_USERREQ__DESTROY_MEMPOOL = 0x1304,
5166 VG_USERREQ__MEMPOOL_ALLOC = 0x1305,
5167 VG_USERREQ__MEMPOOL_FREE = 0x1306,
5168 VG_USERREQ__MEMPOOL_TRIM = 0x1307,
5169 VG_USERREQ__MOVE_MEMPOOL = 0x1308,
5170 VG_USERREQ__MEMPOOL_CHANGE = 0x1309,
5171 VG_USERREQ__MEMPOOL_EXISTS = 0x130a,
5172 VG_USERREQ__PRINTF = 0x1401,
5173 VG_USERREQ__PRINTF_BACKTRACE = 0x1402,
5174 VG_USERREQ__PRINTF_VALIST_BY_REF = 0x1403,
5175 VG_USERREQ__PRINTF_BACKTRACE_VALIST_BY_REF = 0x1404,
5176 VG_USERREQ__STACK_REGISTER = 0x1501,
5177 VG_USERREQ__STACK_DEREGISTER = 0x1502,
5178 VG_USERREQ__STACK_CHANGE = 0x1503,
5179 VG_USERREQ__LOAD_PDB_DEBUGINFO = 0x1601,
5180 VG_USERREQ__MAP_IP_TO_SRCLOC = 0x1701,
5181 VG_USERREQ__CHANGE_ERR_DISABLEMENT = 0x1801,
5182 VG_USERREQ__VEX_INIT_FOR_IRI = 0x1901,
5183 VG_USERREQ__INNER_THREADS = 0x1902
5184 } Vg_ClientRequest;
5185static int VALGRIND_PRINTF(const char *format, ...)
5186 __attribute__((format(__printf__, 1, 2), __unused__));
5187static int
5188VALGRIND_PRINTF(const char *format, ...)
5189{
5190 unsigned long _qzz_res;
5191 va_list vargs;
5192 __builtin_va_start(vargs,format);
5193 _qzz_res = __extension__ ({ volatile unsigned long int _zzq_args[6]; volatile unsigned long int _zzq_result; _zzq_args[0] = (unsigned long int)(VG_USERREQ__PRINTF_VALIST_BY_REF); _zzq_args[1] = (unsigned long int)((unsigned long)format); _zzq_args[2] = (unsigned long int)((unsigned long)&vargs); _zzq_args[3] = (unsigned long int)(0); _zzq_args[4] = (unsigned long int)(0); _zzq_args[5] = (unsigned long int)(0); __asm__ volatile("rolq $3, %%rdi ; rolq $13, %%rdi\n\t" "rolq $61, %%rdi ; rolq $51, %%rdi\n\t" "xchgq %%rbx,%%rbx" : "=d" (_zzq_result) : "a" (&_zzq_args[0]), "0" (0) : "cc", "memory" ); _zzq_result; });
5194 __builtin_va_end(vargs);
5195 return (int)_qzz_res;
5196}
5197static int VALGRIND_PRINTF_BACKTRACE(const char *format, ...)
5198 __attribute__((format(__printf__, 1, 2), __unused__));
5199static int
5200VALGRIND_PRINTF_BACKTRACE(const char *format, ...)
5201{
5202 unsigned long _qzz_res;
5203 va_list vargs;
5204 __builtin_va_start(vargs,format);
5205 _qzz_res = __extension__ ({ volatile unsigned long int _zzq_args[6]; volatile unsigned long int _zzq_result; _zzq_args[0] = (unsigned long int)(VG_USERREQ__PRINTF_BACKTRACE_VALIST_BY_REF); _zzq_args[1] = (unsigned long int)((unsigned long)format); _zzq_args[2] = (unsigned long int)((unsigned long)&vargs); _zzq_args[3] = (unsigned long int)(0); _zzq_args[4] = (unsigned long int)(0); _zzq_args[5] = (unsigned long int)(0); __asm__ volatile("rolq $3, %%rdi ; rolq $13, %%rdi\n\t" "rolq $61, %%rdi ; rolq $51, %%rdi\n\t" "xchgq %%rbx,%%rbx" : "=d" (_zzq_result) : "a" (&_zzq_args[0]), "0" (0) : "cc", "memory" ); _zzq_result; });
5206 __builtin_va_end(vargs);
5207 return (int)_qzz_res;
5208}
5209typedef
5210 enum {
5211 VG_USERREQ__MAKE_MEM_NOACCESS = ((unsigned int)((('M')&0xff) << 24 | (('C')&0xff) << 16)),
5212 VG_USERREQ__MAKE_MEM_UNDEFINED,
5213 VG_USERREQ__MAKE_MEM_DEFINED,
5214 VG_USERREQ__DISCARD,
5215 VG_USERREQ__CHECK_MEM_IS_ADDRESSABLE,
5216 VG_USERREQ__CHECK_MEM_IS_DEFINED,
5217 VG_USERREQ__DO_LEAK_CHECK,
5218 VG_USERREQ__COUNT_LEAKS,
5219 VG_USERREQ__GET_VBITS,
5220 VG_USERREQ__SET_VBITS,
5221 VG_USERREQ__CREATE_BLOCK,
5222 VG_USERREQ__MAKE_MEM_DEFINED_IF_ADDRESSABLE,
5223 VG_USERREQ__COUNT_LEAK_BLOCKS,
5224 VG_USERREQ__ENABLE_ADDR_ERROR_REPORTING_IN_RANGE,
5225 VG_USERREQ__DISABLE_ADDR_ERROR_REPORTING_IN_RANGE,
5226 _VG_USERREQ__MEMCHECK_RECORD_OVERLAP_ERROR
5227 = ((unsigned int)((('M')&0xff) << 24 | (('C')&0xff) << 16)) + 256
5228 } Vg_MemCheckClientRequest;
5229static inline unsigned int
5230nlz_int(unsigned int x)
5231{
5232 if (x == 0) return 4 * 8;
5233 return (unsigned int)__builtin_clz(x);
5234}
5235static inline unsigned int
5236nlz_long(unsigned long x)
5237{
5238 if (x == 0) return 8 * 8;
5239 return (unsigned int)__builtin_clzl(x);
5240}
5241static inline unsigned int
5242nlz_long_long(unsigned long long x)
5243{
5244 if (x == 0) return 8 * 8;
5245 return (unsigned int)__builtin_clzll(x);
5246}
5247static inline unsigned int
5248nlz_int128(unsigned __int128 x)
5249{
5250 unsigned __int128 y;
5251 unsigned int n = 128;
5252 y = x >> 64; if (y) {n -= 64; x = y;}
5253 y = x >> 32; if (y) {n -= 32; x = y;}
5254 y = x >> 16; if (y) {n -= 16; x = y;}
5255 y = x >> 8; if (y) {n -= 8; x = y;}
5256 y = x >> 4; if (y) {n -= 4; x = y;}
5257 y = x >> 2; if (y) {n -= 2; x = y;}
5258 y = x >> 1; if (y) {return n - 2;}
5259 return (unsigned int)(n - x);
5260}
5261static inline unsigned int
5262nlz_intptr(uintptr_t x)
5263{
5264 return nlz_long(x);
5265}
5266static inline unsigned int
5267rb_popcount32(uint32_t x)
5268{
5269 return (unsigned int)__builtin_popcount(x);
5270}
5271static inline int
5272rb_popcount64(uint64_t x)
5273{
5274 return __builtin_popcountll(x);
5275}
5276static inline int
5277rb_popcount_intptr(uintptr_t x)
5278{
5279 return rb_popcount64(x);
5280}
5281static inline int
5282ntz_int32(uint32_t x)
5283{
5284 return __builtin_ctz(x);
5285}
5286static inline int
5287ntz_int64(uint64_t x)
5288{
5289 return __builtin_ctzll(x);
5290}
5291static inline int
5292ntz_intptr(uintptr_t x)
5293{
5294 return ntz_int64(x);
5295}
5296VALUE rb_int128t2big(__int128 n);
5297static inline long
5298rb_overflowed_fix_to_int(long x)
5299{
5300 return (long)((unsigned long)(x >> 1) ^ (1LU << (8 * 8 - 1)));
5301}
5302static inline VALUE
5303rb_fix_plus_fix(VALUE x, VALUE y)
5304{
5305 long lz;
5306 if (__builtin_add_overflow((long)x, (long)y-1, &lz)) {
5307 return rb_int2big(rb_overflowed_fix_to_int(lz));
5308 }
5309 else {
5310 return (VALUE)lz;
5311 }
5312}
5313static inline VALUE
5314rb_fix_minus_fix(VALUE x, VALUE y)
5315{
5316 long lz;
5317 if (__builtin_sub_overflow((long)x, (long)y-1, &lz)) {
5318 return rb_int2big(rb_overflowed_fix_to_int(lz));
5319 }
5320 else {
5321 return (VALUE)lz;
5322 }
5323}
5324static inline VALUE
5325rb_fix_mul_fix(VALUE x, VALUE y)
5326{
5327 long lx = ((long)(((long)(x))>>(int)(1)));
5328 long ly = ((long)(((long)(y))>>(int)(1)));
5329 return (((((__int128)lx * (__int128)ly) < (0x7fffffffffffffffL>>1)+1) && (((__int128)lx * (__int128)ly) >= (((long)(-0x7fffffffffffffffL - 1L))>>(int)(1)))) ? (((VALUE)((__int128)lx * (__int128)ly))<<1 | RUBY_FIXNUM_FLAG) : rb_int128t2big((__int128)lx * (__int128)ly));
5330}
5331static inline void
5332rb_fix_divmod_fix(VALUE a, VALUE b, VALUE *divp, VALUE *modp)
5333{
5334 long x = ((long)(((long)(a))>>(int)(1)));
5335 long y = ((long)(((long)(b))>>(int)(1)));
5336 long div, mod;
5337 if (x == (((long)(-0x7fffffffffffffffL - 1L))>>(int)(1)) && y == -1) {
5338 if (divp) *divp = rb_long2num_inline(-(((long)(-0x7fffffffffffffffL - 1L))>>(int)(1)));
5339 if (modp) *modp = (((VALUE)(0))<<1 | RUBY_FIXNUM_FLAG);
5340 return;
5341 }
5342 div = x / y;
5343 mod = x % y;
5344 if (y > 0 ? mod < 0 : mod > 0) {
5345 mod += y;
5346 div -= 1;
5347 }
5348 if (divp) *divp = (((VALUE)(div))<<1 | RUBY_FIXNUM_FLAG);
5349 if (modp) *modp = (((VALUE)(mod))<<1 | RUBY_FIXNUM_FLAG);
5350}
5351static inline VALUE
5352rb_fix_div_fix(VALUE x, VALUE y)
5353{
5354 VALUE div;
5355 rb_fix_divmod_fix(x, y, &div, ((void *)0));
5356 return div;
5357}
5358static inline VALUE
5359rb_fix_mod_fix(VALUE x, VALUE y)
5360{
5361 VALUE mod;
5362 rb_fix_divmod_fix(x, y, ((void *)0), &mod);
5363 return mod;
5364}
5365struct RBignum {
5366 struct RBasic basic;
5367 union {
5368 struct {
5369 size_t len;
5370 unsigned int *digits;
5371 } heap;
5372 unsigned int ary[(8*3/4)];
5373 } as;
5374};
5376 struct RBasic basic;
5377 const VALUE num;
5378 const VALUE den;
5379};
5380struct RFloat {
5381 struct RBasic basic;
5382 double float_value;
5383};
5384struct RComplex {
5385 struct RBasic basic;
5386 const VALUE real;
5387 const VALUE imag;
5388};
5389enum ruby_rhash_flags {
5390 RHASH_ST_TABLE_FLAG = ((VALUE)RUBY_FL_USER3),
5391 RHASH_AR_TABLE_MAX_SIZE = 8,
5392 RHASH_AR_TABLE_SIZE_MASK = (((VALUE)RUBY_FL_USER4)|((VALUE)RUBY_FL_USER5)|((VALUE)RUBY_FL_USER6)|((VALUE)RUBY_FL_USER7)),
5393 RHASH_AR_TABLE_SIZE_SHIFT = (((VALUE)RUBY_FL_USHIFT)+4),
5394 RHASH_AR_TABLE_BOUND_MASK = (((VALUE)RUBY_FL_USER8)|((VALUE)RUBY_FL_USER9)|((VALUE)RUBY_FL_USER10)|((VALUE)RUBY_FL_USER11)),
5395 RHASH_AR_TABLE_BOUND_SHIFT = (((VALUE)RUBY_FL_USHIFT)+8),
5396 RHASH_ENUM_END
5397};
5398int rb_hash_ar_table_p(VALUE hash);
5399struct ar_table_struct *rb_hash_ar_table(VALUE hash);
5400st_table *rb_hash_st_table(VALUE hash);
5401void rb_hash_st_table_set(VALUE hash, st_table *st);
5402typedef struct ar_table_entry {
5403 VALUE hash;
5404 VALUE key;
5405 VALUE record;
5407typedef struct ar_table_struct {
5408 ar_table_entry entries[8];
5409} ar_table;
5410struct RHash {
5411 struct RBasic basic;
5412 union {
5413 st_table *st;
5414 ar_table *ar;
5415 } as;
5416 int iter_lev;
5417 const VALUE ifnone;
5418};
5419extern void ruby_init_setproctitle(int argc, char *argv[]);
5420enum {
5421 RSTRUCT_EMBED_LEN_MAX = 3,
5422 RSTRUCT_EMBED_LEN_MASK = (RUBY_FL_USER2|RUBY_FL_USER1),
5423 RSTRUCT_EMBED_LEN_SHIFT = (RUBY_FL_USHIFT+1),
5424 RSTRUCT_TRANSIENT_FLAG = ((VALUE)RUBY_FL_USER3),
5425 RSTRUCT_ENUM_END
5426};
5427struct RStruct {
5428 struct RBasic basic;
5429 union {
5430 struct {
5431 long len;
5432 const VALUE *ptr;
5433 } heap;
5434 const VALUE ary[RSTRUCT_EMBED_LEN_MAX];
5435 } as;
5436};
5437static inline long
5438rb_struct_len(VALUE st)
5439{
5440 return (((struct RBasic*)(st))->flags & RSTRUCT_EMBED_LEN_MASK) ?
5441 (long)((((struct RBasic*)(st))->flags >> RSTRUCT_EMBED_LEN_SHIFT) & (RSTRUCT_EMBED_LEN_MASK >> RSTRUCT_EMBED_LEN_SHIFT)) : ((struct RStruct*)(st))->as.heap.len;
5442}
5443static inline const VALUE *
5444rb_struct_const_ptr(VALUE st)
5445{
5446 return ((((struct RBasic*)(st))->flags & RSTRUCT_EMBED_LEN_MASK) ? ((struct RStruct*)(st))->as.ary : ((struct RStruct*)(st))->as.heap.ptr);
5447}
5448static inline const VALUE *
5449rb_struct_const_heap_ptr(VALUE st)
5450{
5451 return ((struct RStruct*)(st))->as.heap.ptr;
5452}
5454 char conflict[sizeof(VALUE) * 3];
5455};
5456struct rb_subclass_entry;
5459 VALUE klass;
5460 rb_subclass_entry_t *next;
5461};
5462typedef unsigned long long rb_serial_t;
5464 struct st_table *iv_index_tbl;
5465 struct st_table *iv_tbl;
5466 struct rb_id_table *const_tbl;
5467 struct rb_id_table *callable_m_tbl;
5468 rb_subclass_entry_t *subclasses;
5469 rb_subclass_entry_t **parent_subclasses;
5470 rb_subclass_entry_t **module_subclasses;
5471 rb_serial_t class_serial;
5472 const VALUE origin_;
5473 VALUE refined_class;
5474 rb_alloc_func_t allocator;
5475};
5476typedef struct rb_classext_struct rb_classext_t;
5477struct RClass {
5478 struct RBasic basic;
5479 VALUE super;
5480 rb_classext_t *ptr;
5481 struct rb_id_table *m_tbl;
5482};
5483void rb_class_subclass_add(VALUE super, VALUE klass);
5484void rb_class_remove_from_super_subclasses(VALUE);
5485int rb_singleton_class_internal_p(VALUE sklass);
5486static inline void
5487RCLASS_SET_ORIGIN(VALUE klass, VALUE origin)
5488{
5489 rb_obj_write((VALUE)(klass), (VALUE *)(&((((struct RClass*)(klass))->ptr)->origin_)), (VALUE)(origin), "./internal.h", 1006);
5490 if (klass != origin) ((!(((VALUE)(origin) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(origin) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(origin))->flags & RUBY_T_MASK) != RUBY_T_NODE) ? (void)(((struct RBasic*)(origin))->flags |= (((VALUE)RUBY_FL_USER5))) : (void)0);
5491}
5492static inline VALUE
5493RCLASS_SUPER(VALUE klass)
5494{
5495 return ((struct RClass*)(klass))->super;
5496}
5497static inline VALUE
5498RCLASS_SET_SUPER(VALUE klass, VALUE super)
5499{
5500 if (super) {
5501 rb_class_remove_from_super_subclasses(klass);
5502 rb_class_subclass_add(super, klass);
5503 }
5504 rb_obj_write((VALUE)(klass), (VALUE *)(&((struct RClass*)(klass))->super), (VALUE)(super), "./internal.h", 1024);
5505 return super;
5506}
5507struct RIMemo {
5508 VALUE flags;
5509 VALUE v0;
5510 VALUE v1;
5511 VALUE v2;
5512 VALUE v3;
5513};
5514enum imemo_type {
5515 imemo_env = 0,
5516 imemo_cref = 1,
5517 imemo_svar = 2,
5518 imemo_throw_data = 3,
5519 imemo_ifunc = 4,
5520 imemo_memo = 5,
5521 imemo_ment = 6,
5522 imemo_iseq = 7,
5523 imemo_tmpbuf = 8,
5524 imemo_ast = 9,
5525 imemo_parser_strterm = 10
5526};
5527static inline enum imemo_type
5528imemo_type(VALUE imemo)
5529{
5530 return (((struct RBasic*)(imemo))->flags >> ((VALUE)RUBY_FL_USHIFT)) & 0x0f;
5531}
5532static inline int
5533imemo_type_p(VALUE imemo, enum imemo_type imemo_type)
5534{
5535 if ((__builtin_expect(!!(!(((VALUE)(imemo) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(imemo) & (VALUE)~((VALUE)RUBY_Qnil)) == 0))), 1))) {
5536 const VALUE mask = (0x0f << ((VALUE)RUBY_FL_USHIFT)) | RUBY_T_MASK;
5537 const VALUE expected_type = (imemo_type << ((VALUE)RUBY_FL_USHIFT)) | RUBY_T_IMEMO;
5538 return expected_type == (((struct RBasic*)(imemo))->flags & mask);
5539 }
5540 else {
5541 return 0;
5542 }
5543}
5544struct vm_svar {
5545 VALUE flags;
5546 const VALUE cref_or_me;
5547 const VALUE lastline;
5548 const VALUE backref;
5549 const VALUE others;
5550};
5552 VALUE flags;
5553 VALUE reserved;
5554 const VALUE throw_obj;
5555 const struct rb_control_frame_struct *catch_frame;
5556 VALUE throw_state;
5557};
5559 int min, max;
5560};
5561struct vm_ifunc {
5562 VALUE flags;
5563 VALUE reserved;
5564 VALUE (*func)();
5565 const void *data;
5566 struct vm_ifunc_argc argc;
5567};
5568struct vm_ifunc *rb_vm_ifunc_new(VALUE (*func)(), const void *data, int min_argc, int max_argc);
5569static inline struct vm_ifunc *
5570rb_vm_ifunc_proc_new(VALUE (*func)(), const void *data)
5571{
5572 return rb_vm_ifunc_new(func, data, 0, (-1));
5573}
5575 VALUE flags;
5576 VALUE reserved;
5577 VALUE *ptr;
5578 struct rb_imemo_tmpbuf_struct *next;
5579 size_t cnt;
5581VALUE rb_imemo_tmpbuf_auto_free_pointer(void *buf);
5582VALUE rb_imemo_tmpbuf_auto_free_maybe_mark_buffer(void *buf, size_t cnt);
5583rb_imemo_tmpbuf_t *rb_imemo_tmpbuf_parser_heap(void *buf, rb_imemo_tmpbuf_t *old_heap, size_t cnt);
5584static inline VALUE
5585rb_imemo_tmpbuf_auto_free_pointer_new_from_an_RString(VALUE str)
5586{
5587 const void *src;
5588 void *dst;
5589 size_t len;
5590 do { rb_string_value(&(str)); rb_check_safe_obj(str);} while (0);
5591 len = (!(((struct RBasic*)(str))->flags & RSTRING_NOEMBED) ? (long)((((struct RBasic*)(str))->flags >> RSTRING_EMBED_LEN_SHIFT) & (RSTRING_EMBED_LEN_MASK >> RSTRING_EMBED_LEN_SHIFT)) : ((struct RString*)(str))->as.heap.len);
5592 src = (!(((struct RBasic*)(str))->flags & RSTRING_NOEMBED) ? ((struct RString*)(str))->as.ary : ((struct RString*)(str))->as.heap.ptr);
5593 dst = ruby_xmalloc(len);
5594 memcpy(dst, src, len);
5595 return rb_imemo_tmpbuf_auto_free_pointer(dst);
5596}
5597void rb_strterm_mark(VALUE obj);
5598struct MEMO {
5599 VALUE flags;
5600 VALUE reserved;
5601 const VALUE v1;
5602 const VALUE v2;
5603 union {
5604 long cnt;
5605 long state;
5606 const VALUE value;
5607 VALUE (*func)();
5608 } u3;
5609};
5610enum {
5611 cmp_opt_Fixnum,
5612 cmp_opt_String,
5613 cmp_opt_Float,
5614 cmp_optimizable_count
5615};
5617 unsigned int opt_methods;
5618 unsigned int opt_inited;
5619};
5621 struct rb_global_variable *var;
5622 ID id;
5623};
5625VALUE rb_gvar_get(struct rb_global_entry *);
5626VALUE rb_gvar_set(struct rb_global_entry *, VALUE);
5627VALUE rb_gvar_defined(struct rb_global_entry *);
5628VALUE rb_ary_last(int, const VALUE *, VALUE);
5629void rb_ary_set_len(VALUE, long);
5630void rb_ary_delete_same(VALUE, VALUE);
5631VALUE rb_ary_tmp_new_fill(long capa);
5632VALUE rb_ary_at(VALUE, VALUE);
5633VALUE rb_ary_aref1(VALUE ary, VALUE i);
5634VALUE rb_ary_aref2(VALUE ary, VALUE b, VALUE e);
5635size_t rb_ary_memsize(VALUE);
5636VALUE rb_to_array_type(VALUE obj);
5637VALUE rb_check_to_array(VALUE ary);
5638VALUE rb_ary_tmp_new_from_values(VALUE, long, const VALUE *);
5639VALUE rb_ary_behead(VALUE, long);
5640static inline VALUE
5641rb_ary_entry_internal(VALUE ary, long offset)
5642{
5643 long len = rb_array_len(ary);
5644 const VALUE *ptr = rb_array_const_ptr_transient(ary);
5645 if (len == 0) return ((VALUE)RUBY_Qnil);
5646 if (offset < 0) {
5647 offset += len;
5648 if (offset < 0) return ((VALUE)RUBY_Qnil);
5649 }
5650 else if (len <= offset) {
5651 return ((VALUE)RUBY_Qnil);
5652 }
5653 return ptr[offset];
5654}
5655extern const char ruby_digitmap[];
5656double rb_big_fdiv_double(VALUE x, VALUE y);
5657VALUE rb_big_uminus(VALUE x);
5658VALUE rb_big_hash(VALUE);
5659VALUE rb_big_odd_p(VALUE);
5660VALUE rb_big_even_p(VALUE);
5661size_t rb_big_size(VALUE);
5662VALUE rb_integer_float_cmp(VALUE x, VALUE y);
5663VALUE rb_integer_float_eq(VALUE x, VALUE y);
5664VALUE rb_cstr_parse_inum(const char *str, ssize_t len, char **endp, int base);
5665VALUE rb_str_convert_to_inum(VALUE str, int base, int badcheck, int raise_exception);
5666VALUE rb_big_comp(VALUE x);
5667VALUE rb_big_aref(VALUE x, VALUE y);
5668VALUE rb_big_abs(VALUE x);
5669VALUE rb_big_size_m(VALUE big);
5670VALUE rb_big_bit_length(VALUE big);
5671VALUE rb_big_remainder(VALUE x, VALUE y);
5672VALUE rb_big_gt(VALUE x, VALUE y);
5673VALUE rb_big_ge(VALUE x, VALUE y);
5674VALUE rb_big_lt(VALUE x, VALUE y);
5675VALUE rb_big_le(VALUE x, VALUE y);
5676VALUE rb_int_powm(int const argc, VALUE * const argv, VALUE const num);
5677VALUE rb_class_boot(VALUE);
5678VALUE rb_class_inherited(VALUE, VALUE);
5679VALUE rb_make_metaclass(VALUE, VALUE);
5680VALUE rb_include_class_new(VALUE, VALUE);
5681void rb_class_foreach_subclass(VALUE klass, void (*f)(VALUE, VALUE), VALUE);
5682void rb_class_detach_subclasses(VALUE);
5683void rb_class_detach_module_subclasses(VALUE);
5684void rb_class_remove_from_module_subclasses(VALUE);
5685VALUE rb_obj_methods(int argc, const VALUE *argv, VALUE obj);
5686VALUE rb_obj_protected_methods(int argc, const VALUE *argv, VALUE obj);
5687VALUE rb_obj_private_methods(int argc, const VALUE *argv, VALUE obj);
5688VALUE rb_obj_public_methods(int argc, const VALUE *argv, VALUE obj);
5689VALUE rb_special_singleton_class(VALUE);
5690VALUE rb_singleton_class_clone_and_attach(VALUE obj, VALUE attach);
5691VALUE rb_singleton_class_get(VALUE obj);
5692void Init_class_hierarchy(void);
5693int rb_class_has_methods(VALUE c);
5694void rb_undef_methods_from(VALUE klass, VALUE super);
5695VALUE rb_invcmp(VALUE, VALUE);
5696struct rb_block;
5697int rb_dvar_defined(ID, const struct rb_block *);
5698int rb_local_defined(ID, const struct rb_block *);
5699const char * rb_insns_name(int i);
5700VALUE rb_insns_name_array(void);
5701int rb_vm_insn_addr2insn(const void *);
5702VALUE rb_dbl_complex_new_polar_pi(double abs, double ang);
5703struct rb_thread_struct;
5704struct rb_fiber_struct;
5705VALUE rb_obj_is_fiber(VALUE);
5706void rb_fiber_reset_root_local_storage(struct rb_thread_struct *);
5707void ruby_register_rollback_func_for_ensure(VALUE (*ensure_func)(), VALUE (*rollback_func)());
5708void rb_fiber_init_mjit_cont(struct rb_fiber_struct *fiber);
5709void ruby_debug_printf(const char*, ...) __attribute__((format(printf, 1, 2)));
5710VALUE rb_dir_getwd_ospath(void);
5711void Init_enc(void);
5712void Init_ext(void);
5713ID rb_id_encoding(void);
5714int rb_encdb_replicate(const char *alias, const char *orig);
5715int rb_encdb_alias(const char *alias, const char *orig);
5716int rb_encdb_dummy(const char *name);
5717void rb_encdb_declare(const char *name);
5718void rb_enc_set_base(const char *name, const char *orig);
5719int rb_enc_set_dummy(int index);
5720void rb_encdb_set_unicode(int index);
5721__attribute__ ((__pure__)) int rb_data_is_encoding(VALUE obj);
5722extern VALUE rb_cArithSeq;
5723VALUE rb_f_send(int argc, VALUE *argv, VALUE recv);
5724VALUE rb_nmin_run(VALUE obj, VALUE num, int by, int rev, int ary);
5725extern VALUE rb_eEAGAIN;
5726extern VALUE rb_eEWOULDBLOCK;
5727extern VALUE rb_eEINPROGRESS;
5728void rb_report_bug_valist(VALUE file, int line, const char *fmt, va_list args);
5729VALUE rb_check_backtrace(VALUE);
5730__attribute__ ((__noreturn__)) void rb_async_bug_errno(const char *,int);
5731const char *rb_builtin_type_name(int t);
5732const char *rb_builtin_class_name(VALUE x);
5733void rb_sys_warn(const char *fmt, ...) __attribute__((format(printf, 1, 2)));
5734void rb_syserr_warn(int err, const char *fmt, ...) __attribute__((format(printf, 2, 3)));
5735void rb_sys_warning(const char *fmt, ...) __attribute__((format(printf, 1, 2)));
5736void rb_syserr_warning(int err, const char *fmt, ...) __attribute__((format(printf, 2, 3)));
5737VALUE rb_name_err_new(VALUE mesg, VALUE recv, VALUE method);
5738VALUE rb_nomethod_err_new(VALUE mesg, VALUE recv, VALUE method, VALUE args, int priv);
5739VALUE rb_key_err_new(VALUE mesg, VALUE recv, VALUE name);
5740__attribute__ ((__noreturn__)) void ruby_deprecated_internal_feature(const char *);
5741VALUE rb_warning_warn(VALUE mod, VALUE str);
5742VALUE rb_warning_string(const char *fmt, ...) __attribute__((format(printf, 1, 2)));
5743VALUE rb_refinement_module_get_refined_class(VALUE module);
5744extern ID ruby_static_id_signo, ruby_static_id_status;
5745void rb_class_modify_check(VALUE);
5746VALUE rb_get_backtrace(VALUE info);
5747void rb_call_end_proc(VALUE data);
5748void rb_mark_end_proc(void);
5749extern const char ruby_null_device[];
5750VALUE rb_home_dir_of(VALUE user, VALUE result);
5751VALUE rb_default_home_dir(VALUE result);
5752VALUE rb_realpath_internal(VALUE basedir, VALUE path, int strict);
5753VALUE rb_check_realpath(VALUE basedir, VALUE path);
5754void rb_file_const(const char*, VALUE);
5755int rb_file_load_ok(const char *);
5756VALUE rb_file_expand_path_fast(VALUE, VALUE);
5757VALUE rb_file_expand_path_internal(VALUE, VALUE, int, int, VALUE);
5758VALUE rb_get_path_check_to_string(VALUE, int);
5759VALUE rb_get_path_check_convert(VALUE, VALUE, int);
5760VALUE rb_get_path_check(VALUE, int);
5761void Init_File(void);
5762int ruby_is_fd_loadable(int fd);
5763__attribute__ ((__noreturn__)) void rb_sys_fail_path_in(const char *func_name, VALUE path);
5764__attribute__ ((__noreturn__)) void rb_syserr_fail_path_in(const char *func_name, int err, VALUE path);
5765extern VALUE *ruby_initial_gc_stress_ptr;
5766extern int ruby_disable_gc;
5767void Init_heap(void);
5768void *ruby_mimmalloc(size_t size);
5769void ruby_mimfree(void *ptr);
5770void rb_objspace_set_event_hook(const rb_event_flag_t event);
5771void rb_gc_writebarrier_remember(VALUE obj);
5772void ruby_gc_set_params(int safe_level);
5773void rb_copy_wb_protected_attribute(VALUE dest, VALUE obj);
5774void *rb_aligned_malloc(size_t, size_t);
5775void rb_aligned_free(void *);
5776struct st_table *rb_hash_tbl_raw(VALUE hash);
5777VALUE rb_hash_new_with_size(st_index_t size);
5778
5779
5780VALUE rb_hash_new_compare_by_id(void);
5781
5782
5783VALUE rb_hash_has_key(VALUE hash, VALUE key);
5784VALUE rb_hash_default_value(VALUE hash, VALUE key);
5785VALUE rb_hash_set_default_proc(VALUE hash, VALUE proc);
5786long rb_objid_hash(st_index_t index);
5787long rb_dbl_long_hash(double d);
5788st_table *rb_init_identtable(void);
5789st_table *rb_init_identtable_with_size(st_index_t size);
5790VALUE rb_hash_compare_by_id_p(VALUE hash);
5791VALUE rb_to_hash_type(VALUE obj);
5792VALUE rb_hash_key_str(VALUE);
5793VALUE rb_hash_keys(VALUE hash);
5794VALUE rb_hash_values(VALUE hash);
5795VALUE rb_hash_rehash(VALUE hash);
5796VALUE rb_hash_resurrect(VALUE hash);
5797int rb_hash_add_new_element(VALUE hash, VALUE key, VALUE val);
5798VALUE rb_hash_set_pair(VALUE hash, VALUE pair);
5799void rb_hash_bulk_insert(long, const VALUE *, VALUE);
5800int rb_hash_stlike_lookup(VALUE hash, st_data_t key, st_data_t *pval);
5801int rb_hash_stlike_delete(VALUE hash, st_data_t *pkey, st_data_t *pval);
5802int rb_hash_stlike_foreach(VALUE hash, int (*func)(), st_data_t arg);
5803int rb_hash_stlike_update(VALUE hash, st_data_t key, st_update_callback_func func, st_data_t arg);
5804void rb_call_inits(void);
5805const char *ruby_get_inplace_mode(void);
5806void ruby_set_inplace_mode(const char *);
5807ssize_t rb_io_bufread(VALUE io, void *buf, size_t size);
5808void rb_stdio_set_default_encoding(void);
5809VALUE rb_io_flush_raw(VALUE, int);
5810int rb_stderr_tty_p(void);
5811void rb_io_fptr_finalize_internal(void *ptr);
5812VALUE rb_get_load_path(void);
5813VALUE rb_get_expanded_load_path(void);
5814int rb_require_internal(VALUE fname, int safe);
5815__attribute__ ((__noreturn__)) void rb_load_fail(VALUE, const char*);
5816extern const char ruby_exec_prefix[];
5817extern const char ruby_initial_load_paths[];
5818int Init_enc_set_filesystem_encoding(void);
5819VALUE rb_math_atan2(VALUE, VALUE);
5820VALUE rb_math_cos(VALUE);
5821VALUE rb_math_cosh(VALUE);
5822VALUE rb_math_exp(VALUE);
5823VALUE rb_math_hypot(VALUE, VALUE);
5824VALUE rb_math_log(int argc, const VALUE *argv);
5825VALUE rb_math_sin(VALUE);
5826VALUE rb_math_sinh(VALUE);
5827VALUE rb_math_sqrt(VALUE);
5828extern int mjit_enabled;
5829VALUE mjit_pause(int wait_p);
5830VALUE mjit_resume(void);
5831void mjit_finish(int close_handle_p);
5832void Init_newline(void);
5833enum ruby_num_rounding_mode {
5834 RUBY_NUM_ROUND_HALF_UP,
5835 RUBY_NUM_ROUND_HALF_EVEN,
5836 RUBY_NUM_ROUND_HALF_DOWN,
5837 RUBY_NUM_ROUND_DEFAULT = RUBY_NUM_ROUND_HALF_UP
5838};
5839int rb_num_to_uint(VALUE val, unsigned int *ret);
5840VALUE ruby_num_interval_step_size(VALUE from, VALUE to, VALUE step, int excl);
5841double ruby_float_step_size(double beg, double end, double unit, int excl);
5842int ruby_float_step(VALUE from, VALUE to, VALUE step, int excl, int allow_endless);
5843double ruby_float_mod(double x, double y);
5844int rb_num_negative_p(VALUE);
5845VALUE rb_int_succ(VALUE num);
5846VALUE rb_int_pred(VALUE num);
5847VALUE rb_int_uminus(VALUE num);
5848VALUE rb_float_uminus(VALUE num);
5849VALUE rb_int_plus(VALUE x, VALUE y);
5850VALUE rb_float_plus(VALUE x, VALUE y);
5851VALUE rb_int_minus(VALUE x, VALUE y);
5852VALUE rb_int_mul(VALUE x, VALUE y);
5853VALUE rb_float_mul(VALUE x, VALUE y);
5854VALUE rb_int_idiv(VALUE x, VALUE y);
5855VALUE rb_int_modulo(VALUE x, VALUE y);
5856VALUE rb_int_round(VALUE num, int ndigits, enum ruby_num_rounding_mode mode);
5857VALUE rb_int2str(VALUE num, int base);
5858VALUE rb_dbl_hash(double d);
5859VALUE rb_fix_plus(VALUE x, VALUE y);
5860VALUE rb_int_gt(VALUE x, VALUE y);
5861int rb_float_cmp(VALUE x, VALUE y);
5862VALUE rb_float_gt(VALUE x, VALUE y);
5863VALUE rb_int_ge(VALUE x, VALUE y);
5864enum ruby_num_rounding_mode rb_num_get_rounding_option(VALUE opts);
5865double rb_int_fdiv_double(VALUE x, VALUE y);
5866VALUE rb_int_pow(VALUE x, VALUE y);
5867VALUE rb_float_pow(VALUE x, VALUE y);
5868VALUE rb_int_cmp(VALUE x, VALUE y);
5869VALUE rb_int_equal(VALUE x, VALUE y);
5870VALUE rb_int_divmod(VALUE x, VALUE y);
5871VALUE rb_int_and(VALUE x, VALUE y);
5872VALUE rb_int_lshift(VALUE x, VALUE y);
5873VALUE rb_int_div(VALUE x, VALUE y);
5874VALUE rb_int_abs(VALUE num);
5875VALUE rb_int_odd_p(VALUE num);
5876int rb_int_positive_p(VALUE num);
5877int rb_int_negative_p(VALUE num);
5878VALUE rb_num_pow(VALUE x, VALUE y);
5879static inline VALUE
5880rb_num_compare_with_zero(VALUE num, ID mid)
5881{
5882 VALUE zero = (((VALUE)(0))<<1 | RUBY_FIXNUM_FLAG);
5883 VALUE r = rb_check_funcall(num, mid, 1, &zero);
5884 if (r == ((VALUE)RUBY_Qundef)) {
5885 rb_cmperr(num, zero);
5886 }
5887 return r;
5888}
5889static inline int
5890rb_num_positive_int_p(VALUE num)
5891{
5892 const ID mid = '>';
5893 if ((((int)(long)(num))&RUBY_FIXNUM_FLAG)) {
5895 return ((long)(num) > (long)(((VALUE)(0))<<1 | RUBY_FIXNUM_FLAG));
5896 }
5897 else if (( ((RUBY_T_BIGNUM) == RUBY_T_FIXNUM) ? (((int)(long)(num))&RUBY_FIXNUM_FLAG) : ((RUBY_T_BIGNUM) == RUBY_T_TRUE) ? ((num) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_BIGNUM) == RUBY_T_FALSE) ? ((num) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_BIGNUM) == RUBY_T_NIL) ? ((num) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_BIGNUM) == RUBY_T_UNDEF) ? ((num) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_BIGNUM) == RUBY_T_SYMBOL) ? ((((VALUE)(num)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(num) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(num) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(num))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_BIGNUM) == RUBY_T_FLOAT) ? ( ((((int)(long)(num))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(num) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(num) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(num))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(num) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(num) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(num))->flags & RUBY_T_MASK) == (RUBY_T_BIGNUM)))) {
5899 return ((((struct RBasic*)(num))->flags & ((VALUE)((VALUE)RUBY_FL_USER1))) != 0);
5900 }
5901 return !(((VALUE)(rb_num_compare_with_zero(num, mid)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0);
5902}
5903static inline int
5904rb_num_negative_int_p(VALUE num)
5905{
5906 const ID mid = '<';
5907 if ((((int)(long)(num))&RUBY_FIXNUM_FLAG)) {
5909 return ((long)(num) < 0);
5910 }
5911 else if (( ((RUBY_T_BIGNUM) == RUBY_T_FIXNUM) ? (((int)(long)(num))&RUBY_FIXNUM_FLAG) : ((RUBY_T_BIGNUM) == RUBY_T_TRUE) ? ((num) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_BIGNUM) == RUBY_T_FALSE) ? ((num) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_BIGNUM) == RUBY_T_NIL) ? ((num) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_BIGNUM) == RUBY_T_UNDEF) ? ((num) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_BIGNUM) == RUBY_T_SYMBOL) ? ((((VALUE)(num)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(num) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(num) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(num))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_BIGNUM) == RUBY_T_FLOAT) ? ( ((((int)(long)(num))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(num) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(num) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(num))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(num) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(num) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(num))->flags & RUBY_T_MASK) == (RUBY_T_BIGNUM)))) {
5913 return (!((((struct RBasic*)(num))->flags & ((VALUE)((VALUE)RUBY_FL_USER1))) != 0));
5914 }
5915 return !(((VALUE)(rb_num_compare_with_zero(num, mid)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0);
5916}
5917VALUE rb_float_abs(VALUE flt);
5918VALUE rb_float_equal(VALUE x, VALUE y);
5919VALUE rb_float_eql(VALUE x, VALUE y);
5920VALUE rb_flo_div_flo(VALUE x, VALUE y);
5921static inline double
5922rb_float_flonum_value(VALUE v)
5923{
5924 if (v != (VALUE)0x8000000000000002) {
5925 union {
5926 double d;
5927 VALUE v;
5928 } t;
5929 VALUE b63 = (v >> 63);
5930 t.v = ((((2 - b63) | (v & ~(VALUE)0x03)) >> (3)) | (((2 - b63) | (v & ~(VALUE)0x03)) << ((sizeof((2 - b63) | (v & ~(VALUE)0x03)) * 8) - 3)));
5931 return t.d;
5932 }
5933 return 0.0;
5934}
5935static inline double
5936rb_float_noflonum_value(VALUE v)
5937{
5938 return ((struct RFloat *)v)->float_value;
5939}
5940static inline double
5941rb_float_value_inline(VALUE v)
5942{
5943 if (((((int)(long)(v))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG)) {
5944 return rb_float_flonum_value(v);
5945 }
5946 return rb_float_noflonum_value(v);
5947}
5948static inline VALUE
5949rb_float_new_inline(double d)
5950{
5951 union {
5952 double d;
5953 VALUE v;
5954 } t;
5955 int bits;
5956 t.d = d;
5957 bits = (int)((VALUE)(t.v >> 60) & 0x7);
5958 if (t.v != 0x3000000000000000 &&
5959 !((bits-3) & ~0x01)) {
5960 return ((((t.v) << (3)) | ((t.v) >> ((sizeof(t.v) * 8) - 3))) & ~(VALUE)0x01) | 0x02;
5961 }
5962 else if (t.v == (VALUE)0) {
5963 return 0x8000000000000002;
5964 }
5965 return rb_float_new_in_heap(d);
5966}
5967void rb_obj_copy_ivar(VALUE dest, VALUE obj);
5968__attribute__ ((__const__)) VALUE rb_obj_equal(VALUE obj1, VALUE obj2);
5969__attribute__ ((__const__)) VALUE rb_obj_not(VALUE obj);
5970VALUE rb_class_search_ancestor(VALUE klass, VALUE super);
5971__attribute__ ((__noreturn__)) void rb_undefined_alloc(VALUE klass);
5972double rb_num_to_dbl(VALUE val);
5973VALUE rb_obj_dig(int argc, VALUE *argv, VALUE self, VALUE notfound);
5974VALUE rb_immutable_obj_clone(int, VALUE *, VALUE);
5975VALUE rb_obj_not_equal(VALUE obj1, VALUE obj2);
5976VALUE rb_convert_type_with_id(VALUE,int,const char*,ID);
5977VALUE rb_check_convert_type_with_id(VALUE,int,const char*,ID);
5979 VALUE flags;
5980 VALUE klass;
5981};
5982VALUE rb_parser_get_yydebug(VALUE);
5983VALUE rb_parser_set_yydebug(VALUE, VALUE);
5984
5985
5986VALUE rb_parser_set_context(VALUE, const struct rb_block *, int);
5987
5988
5989void *rb_parser_load_file(VALUE parser, VALUE name);
5990int rb_is_const_name(VALUE name);
5991int rb_is_class_name(VALUE name);
5992int rb_is_global_name(VALUE name);
5993int rb_is_instance_name(VALUE name);
5994int rb_is_attrset_name(VALUE name);
5995int rb_is_local_name(VALUE name);
5996int rb_is_method_name(VALUE name);
5997int rb_is_junk_name(VALUE name);
5998__attribute__ ((__pure__)) int rb_is_const_sym(VALUE sym);
5999__attribute__ ((__pure__)) int rb_is_class_sym(VALUE sym);
6000__attribute__ ((__pure__)) int rb_is_global_sym(VALUE sym);
6001__attribute__ ((__pure__)) int rb_is_instance_sym(VALUE sym);
6002__attribute__ ((__pure__)) int rb_is_attrset_sym(VALUE sym);
6003__attribute__ ((__pure__)) int rb_is_local_sym(VALUE sym);
6004__attribute__ ((__pure__)) int rb_is_method_sym(VALUE sym);
6005__attribute__ ((__pure__)) int rb_is_junk_sym(VALUE sym);
6006ID rb_make_internal_id(void);
6007void rb_gc_free_dsymbol(VALUE);
6008ID rb_id_attrget(ID id);
6009VALUE rb_proc_location(VALUE self);
6010st_index_t rb_hash_proc(st_index_t hash, VALUE proc);
6011int rb_block_arity(void);
6012int rb_block_min_max_arity(int *max);
6013VALUE rb_func_proc_new(rb_block_call_func_t func, VALUE val);
6014VALUE rb_func_lambda_new(rb_block_call_func_t func, VALUE val, int min_argc, int max_argc);
6015VALUE rb_block_to_s(VALUE self, const struct rb_block *block, const char *additional_info);
6016struct waitpid_state;
6018 union {
6019 struct {
6020 VALUE shell_script;
6021 } sh;
6022 struct {
6023 VALUE command_name;
6024 VALUE command_abspath;
6025 VALUE argv_str;
6026 VALUE argv_buf;
6027 } cmd;
6028 } invoke;
6029 VALUE redirect_fds;
6030 VALUE envp_str;
6031 VALUE envp_buf;
6032 VALUE dup2_tmpbuf;
6033 unsigned use_shell : 1;
6034 unsigned pgroup_given : 1;
6035 unsigned umask_given : 1;
6036 unsigned unsetenv_others_given : 1;
6037 unsigned unsetenv_others_do : 1;
6038 unsigned close_others_given : 1;
6039 unsigned close_others_do : 1;
6040 unsigned chdir_given : 1;
6041 unsigned new_pgroup_given : 1;
6042 unsigned new_pgroup_flag : 1;
6043 unsigned uid_given : 1;
6044 unsigned gid_given : 1;
6045 unsigned exception : 1;
6047 pid_t pgroup_pgid;
6048 VALUE rlimit_limits;
6049 mode_t umask_mask;
6050 uid_t uid;
6051 gid_t gid;
6052 int close_others_maxhint;
6053 VALUE fd_dup2;
6054 VALUE fd_close;
6055 VALUE fd_open;
6056 VALUE fd_dup2_child;
6057 VALUE env_modification;
6058 VALUE path_env;
6059 VALUE chdir_dir;
6060};
6061static inline size_t
6062ARGVSTR2ARGC(VALUE argv_str)
6063{
6064 size_t i = 0;
6065 char *const *p = ((char **)((void *)(((const struct rb_imemo_tmpbuf_struct *)(argv_str))->ptr)) + 1);
6066 while (p[i++])
6067 ;
6068 return i - 1;
6069}
6070pid_t rb_fork_ruby(int *status);
6071void rb_last_status_clear(void);
6072VALUE rb_rational_canonicalize(VALUE x);
6073VALUE rb_rational_uminus(VALUE self);
6074VALUE rb_rational_plus(VALUE self, VALUE other);
6075VALUE rb_rational_mul(VALUE self, VALUE other);
6076VALUE rb_lcm(VALUE x, VALUE y);
6077VALUE rb_rational_reciprocal(VALUE x);
6078VALUE rb_cstr_to_rat(const char *, int);
6079VALUE rb_rational_abs(VALUE self);
6080VALUE rb_rational_cmp(VALUE self, VALUE other);
6081VALUE rb_rational_pow(VALUE self, VALUE other);
6082VALUE rb_numeric_quo(VALUE x, VALUE y);
6083VALUE rb_reg_compile(VALUE str, int options, const char *sourcefile, int sourceline);
6084VALUE rb_reg_check_preprocess(VALUE);
6085long rb_reg_search0(VALUE, VALUE, long, int, int);
6086VALUE rb_reg_match_p(VALUE re, VALUE str, long pos);
6087_Bool rb_reg_start_with_p(VALUE re, VALUE str);
6088void rb_backref_set_string(VALUE string, long pos, long len);
6089void rb_match_unbusy(VALUE);
6090int rb_match_count(VALUE match);
6091int rb_match_nth_defined(int nth, VALUE match);
6092VALUE rb_reg_new_ary(VALUE ary, int options);
6093extern int ruby_enable_coredump;
6094int rb_get_next_signal(void);
6095VALUE rb_fstring(VALUE);
6096VALUE rb_fstring_new(const char *ptr, long len);
6097VALUE rb_fstring_cstr(const char *str);
6098int rb_str_buf_cat_escaped_char(VALUE result, unsigned int c, int unicode_p);
6099int rb_str_symname_p(VALUE);
6100VALUE rb_str_quote_unprintable(VALUE);
6101VALUE rb_id_quote_unprintable(ID);
6102char *rb_str_fill_terminator(VALUE str, const int termlen);
6103void rb_str_change_terminator_length(VALUE str, const int oldtermlen, const int termlen);
6104VALUE rb_str_locktmp_ensure(VALUE str, VALUE (*func)(VALUE), VALUE arg);
6105VALUE rb_str_tmp_frozen_acquire(VALUE str);
6106void rb_str_tmp_frozen_release(VALUE str, VALUE tmp);
6107VALUE rb_str_chomp_string(VALUE str, VALUE chomp);
6108size_t rb_str_memsize(VALUE);
6109VALUE rb_sym_proc_call(ID mid, int argc, const VALUE *argv, VALUE passed_proc);
6110VALUE rb_sym_to_proc(VALUE sym);
6111char *rb_str_to_cstr(VALUE str);
6112VALUE rb_str_eql(VALUE str1, VALUE str2);
6113VALUE rb_obj_as_string_result(VALUE str, VALUE obj);
6114VALUE rb_sym_intern_ascii(const char *ptr, long len);
6115VALUE rb_sym_intern_ascii_cstr(const char *ptr);
6116VALUE rb_to_symbol_type(VALUE obj);
6117VALUE rb_struct_init_copy(VALUE copy, VALUE s);
6118VALUE rb_struct_lookup(VALUE s, VALUE idx);
6119VALUE rb_struct_s_keyword_init(VALUE klass);
6120struct timeval rb_time_timeval(VALUE);
6121VALUE rb_obj_is_mutex(VALUE obj);
6122VALUE rb_suppress_tracing(VALUE (*func)(VALUE), VALUE arg);
6123void rb_thread_execute_interrupts(VALUE th);
6124void rb_clear_trace_func(void);
6125VALUE rb_get_coverages(void);
6126int rb_get_coverage_mode(void);
6127VALUE rb_default_coverage(int);
6128VALUE rb_thread_shield_new(void);
6129VALUE rb_thread_shield_wait(VALUE self);
6130VALUE rb_thread_shield_release(VALUE self);
6131VALUE rb_thread_shield_destroy(VALUE self);
6132int rb_thread_to_be_killed(VALUE thread);
6133void rb_mutex_allow_trap(VALUE self, int val);
6134VALUE rb_uninterruptible(VALUE (*b_proc)(), VALUE data);
6135VALUE rb_mutex_owned_p(VALUE self);
6136extern VALUE rb_cEncodingConverter;
6137char *ruby_dtoa(double d_, int mode, int ndigits, int *decpt, int *sign, char **rve);
6138char *ruby_hdtoa(double d, const char *xdigs, int ndigits, int *decpt, int *sign, char **rve);
6139void rb_gc_mark_global_tbl(void);
6140size_t rb_generic_ivar_memsize(VALUE);
6141VALUE rb_search_class_path(VALUE);
6142VALUE rb_attr_delete(VALUE, ID);
6143VALUE rb_ivar_lookup(VALUE obj, ID id, VALUE undef);
6144void rb_autoload_str(VALUE mod, ID id, VALUE file);
6145void rb_deprecate_constant(VALUE mod, const char *name);
6146__attribute__ ((__noreturn__)) VALUE rb_mod_const_missing(VALUE,VALUE);
6147rb_gvar_getter_t *rb_gvar_getter_function_of(const struct rb_global_entry *);
6148rb_gvar_setter_t *rb_gvar_setter_function_of(const struct rb_global_entry *);
6149_Bool rb_gvar_is_traced(const struct rb_global_entry *);
6150rb_serial_t rb_next_class_serial(void);
6151VALUE rb_obj_is_thread(VALUE obj);
6152void rb_vm_mark(void *ptr);
6153void Init_BareVM(void);
6154void Init_vm_objects(void);
6155__attribute__ ((__pure__)) VALUE rb_vm_top_self(void);
6156void rb_thread_recycle_stack_release(VALUE *);
6157VALUE *rb_thread_recycle_stack(size_t);
6158void rb_vm_change_state(void);
6159void rb_vm_inc_const_missing_count(void);
6160const void **rb_vm_get_insns_address_table(void);
6161VALUE rb_source_location(int *pline);
6162const char *rb_source_location_cstr(int *pline);
6163static void rb_vm_pop_cfunc_frame(void);
6164int rb_vm_add_root_module(ID id, VALUE module);
6165void rb_vm_check_redefinition_by_prepend(VALUE klass);
6166VALUE rb_yield_refine_block(VALUE refinement, VALUE refinements);
6167static VALUE ruby_vm_special_exception_copy(VALUE);
6168__attribute__ ((__pure__)) st_table *rb_vm_fstring_table(void);
6169void rb_print_backtrace(void);
6170void Init_vm_eval(void);
6171VALUE rb_current_realfilepath(void);
6172VALUE rb_check_block_call(VALUE, ID, int, const VALUE *, rb_block_call_func_t, VALUE);
6173typedef void rb_check_funcall_hook(int, VALUE, ID, int, const VALUE *, VALUE);
6174VALUE rb_check_funcall_with_hook(VALUE recv, ID mid, int argc, const VALUE *argv,
6175 rb_check_funcall_hook *hook, VALUE arg);
6176const char *rb_type_str(enum ruby_value_type type);
6177VALUE rb_check_funcall_default(VALUE, ID, int, const VALUE *, VALUE);
6178VALUE rb_yield_1(VALUE val);
6179VALUE rb_yield_force_blockarg(VALUE values);
6180VALUE rb_lambda_call(VALUE obj, ID mid, int argc, const VALUE *argv,
6181 rb_block_call_func_t bl_proc, int min_argc, int max_argc,
6182 VALUE data2);
6183VALUE rb_equal_opt(VALUE obj1, VALUE obj2);static inline
6184VALUE rb_eql_opt(VALUE obj1, VALUE obj2);static inline
6185void Init_vm_stack_canary(void);
6186void Init_eval_method(void);
6187int rb_method_defined_by(VALUE obj, ID mid, VALUE (*cfunc)());
6188void Init_prelude(void);
6189void Init_vm_backtrace(void);
6190VALUE rb_vm_thread_backtrace(int argc, const VALUE *argv, VALUE thval);
6191VALUE rb_vm_thread_backtrace_locations(int argc, const VALUE *argv, VALUE thval);
6192VALUE rb_make_backtrace(void);
6193void rb_backtrace_print_as_bugreport(void);
6194int rb_backtrace_p(VALUE obj);
6195VALUE rb_backtrace_to_str_ary(VALUE obj);
6196VALUE rb_backtrace_to_location_ary(VALUE obj);
6197void rb_backtrace_each(VALUE (*iter)(VALUE recv, VALUE str), VALUE output);
6198
6199
6200const char *rb_objspace_data_type_name(VALUE obj);
6201VALUE rb_thread_io_blocking_region(rb_blocking_function_t *func, void *data1, int fd);
6202void rb_ary_detransient(VALUE a);
6203VALUE *rb_ary_ptr_use_start(VALUE ary);
6204void rb_ary_ptr_use_end(VALUE ary);
6205VALUE rb_big_mul_normal(VALUE x, VALUE y);
6206VALUE rb_big_mul_balance(VALUE x, VALUE y);
6207VALUE rb_big_mul_karatsuba(VALUE x, VALUE y);
6208VALUE rb_big_mul_toom3(VALUE x, VALUE y);
6209VALUE rb_big_sq_fast(VALUE x);
6210VALUE rb_big_divrem_normal(VALUE x, VALUE y);
6211VALUE rb_big2str_poweroftwo(VALUE x, int base);
6212VALUE rb_big2str_generic(VALUE x, int base);
6213VALUE rb_str2big_poweroftwo(VALUE arg, int base, int badcheck);
6214VALUE rb_str2big_normal(VALUE arg, int base, int badcheck);
6215VALUE rb_str2big_karatsuba(VALUE arg, int base, int badcheck);
6216VALUE rb_big_mul_gmp(VALUE x, VALUE y);
6217VALUE rb_big_divrem_gmp(VALUE x, VALUE y);
6218VALUE rb_big2str_gmp(VALUE x, int base);
6219VALUE rb_str2big_gmp(VALUE arg, int base, int badcheck);
6220enum rb_int_parse_flags {
6221 RB_INT_PARSE_SIGN = 0x01,
6222 RB_INT_PARSE_UNDERSCORE = 0x02,
6223 RB_INT_PARSE_PREFIX = 0x04,
6224 RB_INT_PARSE_ALL = 0x07,
6225 RB_INT_PARSE_DEFAULT = 0x07
6226};
6227VALUE rb_int_parse_cstr(const char *str, ssize_t len, char **endp, size_t *ndigits, int base, int flags);
6228VALUE rb_arith_seq_new(VALUE obj, VALUE meth, int argc, VALUE const *argv,
6229 rb_enumerator_size_func *size_fn,
6230 VALUE beg, VALUE end, VALUE step, int excl);
6231int rb_bug_reporter_add(void (*func)(FILE *, void *), void *data);
6232__attribute__ ((__noreturn__)) void rb_unexpected_type(VALUE,int);
6233static inline int
6234rb_typeddata_is_instance_of_inline(VALUE obj, const rb_data_type_t *data_type)
6235{
6236 return ( ((RUBY_T_DATA) == RUBY_T_FIXNUM) ? (((int)(long)(obj))&RUBY_FIXNUM_FLAG) : ((RUBY_T_DATA) == RUBY_T_TRUE) ? ((obj) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_DATA) == RUBY_T_FALSE) ? ((obj) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_DATA) == RUBY_T_NIL) ? ((obj) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_DATA) == RUBY_T_UNDEF) ? ((obj) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_DATA) == RUBY_T_SYMBOL) ? ((((VALUE)(obj)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(obj))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_DATA) == RUBY_T_FLOAT) ? ( ((((int)(long)(obj))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(obj))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(obj))->flags & RUBY_T_MASK) == (RUBY_T_DATA))) && (((struct RTypedData*)(obj))->typed_flag == 1) && ((((struct RTypedData*)(obj))->type) == data_type);
6237}
6238VALUE rb_hash_delete_entry(VALUE hash, VALUE key);
6239VALUE rb_ident_hash_new(void);
6240void rb_maygvl_fd_fix_cloexec(int fd);
6241int rb_gc_for_fd(int err);
6242void rb_write_error_str(VALUE mesg);
6243VALUE rb_int_positive_pow(long x, unsigned long y);
6244int rb_exec_async_signal_safe(const struct rb_execarg *e, char *errmsg, size_t errmsg_buflen);
6245pid_t rb_fork_async_signal_safe(int *status, int (*chfunc)(void*, char *, size_t), void *charg, VALUE fds, char *errmsg, size_t errmsg_buflen);
6246VALUE rb_execarg_new(int argc, const VALUE *argv, int accept_shell, int allow_exc_opt);
6247struct rb_execarg *rb_execarg_get(VALUE execarg_obj);
6248int rb_execarg_addopt(VALUE execarg_obj, VALUE key, VALUE val);
6249void rb_execarg_parent_start(VALUE execarg_obj);
6250void rb_execarg_parent_end(VALUE execarg_obj);
6251int rb_execarg_run_options(const struct rb_execarg *e, struct rb_execarg *s, char* errmsg, size_t errmsg_buflen);
6252VALUE rb_execarg_extract_options(VALUE execarg_obj, VALUE opthash);
6253void rb_execarg_setenv(VALUE execarg_obj, VALUE env);
6254VALUE rb_gcd(VALUE x, VALUE y);
6255VALUE rb_gcd_normal(VALUE self, VALUE other);
6256VALUE rb_gcd_gmp(VALUE x, VALUE y);
6257int rb_grantpt(int fd);
6258VALUE rb_str_upto_each(VALUE, VALUE, int, int (*each)(VALUE, VALUE), VALUE);
6259VALUE rb_str_upto_endless_each(VALUE, int (*each)(VALUE, VALUE), VALUE);
6260int ruby_thread_has_gvl_p(void);
6261void ruby_reset_leap_second_info(void);
6262extern const signed char ruby_digit36_to_number_table[];
6263extern const char ruby_hexdigits[];
6264extern unsigned long ruby_scan_digits(const char *str, ssize_t len, int base, size_t *retlen, int *overflow);
6265void rb_mark_generic_ivar(VALUE);
6266VALUE rb_const_missing(VALUE klass, VALUE name);
6267int rb_class_ivar_set(VALUE klass, ID vid, VALUE value);
6268st_table *rb_st_copy(VALUE obj, struct st_table *orig_tbl);
6269VALUE rb_wb_protected_newobj_of(VALUE, VALUE);
6270VALUE rb_wb_unprotected_newobj_of(VALUE, VALUE);
6271size_t rb_obj_memsize_of(VALUE);
6272void rb_gc_verify_internal_consistency(void);
6273size_t rb_obj_gc_flags(VALUE, ID[], size_t);
6274void rb_gc_mark_values(long n, const VALUE *values);
6275VALUE rb_imemo_new(enum imemo_type type, VALUE v1, VALUE v2, VALUE v3, VALUE v0);
6276int ruby_fill_random_bytes(void *, size_t, int);
6277
6278
6279
6280
6281typedef struct rb_vm_struct ruby_vm_t;
6283void ruby_vm_at_exit(void(*func)(ruby_vm_t *));
6284
6285
6286const char *rb_obj_info(VALUE obj);
6287const char *rb_raw_obj_info(char *buff, const int buff_size, VALUE obj);
6288void rb_obj_info_dump(VALUE obj);
6289struct rb_thread_struct;
6290
6291
6292size_t rb_objspace_data_type_memsize(VALUE obj);
6293void rb_objspace_reachable_objects_from(VALUE obj, void (func)(VALUE, void *), void *data);
6294void rb_objspace_reachable_objects_from_root(void (func)(const char *category, VALUE, void *), void *data);
6295int rb_objspace_markable_object_p(VALUE obj);
6296int rb_objspace_internal_object_p(VALUE obj);
6297int rb_objspace_marked_object_p(VALUE obj);
6298int rb_objspace_garbage_object_p(VALUE obj);
6299void rb_objspace_each_objects(
6300 int (*callback)(void *start, void *end, size_t stride, void *data),
6301 void *data);
6302void rb_objspace_each_objects_without_setup(
6303 int (*callback)(void *, void *, size_t, void *),
6304 void *data);
6305
6306
6307__attribute__ ((__noreturn__)) void rb_assert_failure(const char *, int, const char *, const char *);
6308enum node_type {
6309 NODE_SCOPE,
6310 NODE_BLOCK,
6311 NODE_IF,
6312 NODE_UNLESS,
6313 NODE_CASE,
6314 NODE_CASE2,
6315 NODE_WHEN,
6316 NODE_WHILE,
6317 NODE_UNTIL,
6318 NODE_ITER,
6319 NODE_FOR,
6320 NODE_FOR_MASGN,
6321 NODE_BREAK,
6322 NODE_NEXT,
6323 NODE_REDO,
6324 NODE_RETRY,
6325 NODE_BEGIN,
6326 NODE_RESCUE,
6327 NODE_RESBODY,
6328 NODE_ENSURE,
6329 NODE_AND,
6330 NODE_OR,
6331 NODE_MASGN,
6332 NODE_LASGN,
6333 NODE_DASGN,
6334 NODE_DASGN_CURR,
6335 NODE_GASGN,
6336 NODE_IASGN,
6337 NODE_CDECL,
6338 NODE_CVASGN,
6339 NODE_OP_ASGN1,
6340 NODE_OP_ASGN2,
6341 NODE_OP_ASGN_AND,
6342 NODE_OP_ASGN_OR,
6343 NODE_OP_CDECL,
6344 NODE_CALL,
6345 NODE_OPCALL,
6346 NODE_FCALL,
6347 NODE_VCALL,
6348 NODE_QCALL,
6349 NODE_SUPER,
6350 NODE_ZSUPER,
6351 NODE_ARRAY,
6352 NODE_ZARRAY,
6353 NODE_VALUES,
6354 NODE_HASH,
6355 NODE_RETURN,
6356 NODE_YIELD,
6357 NODE_LVAR,
6358 NODE_DVAR,
6359 NODE_GVAR,
6360 NODE_IVAR,
6361 NODE_CONST,
6362 NODE_CVAR,
6363 NODE_NTH_REF,
6364 NODE_BACK_REF,
6365 NODE_MATCH,
6366 NODE_MATCH2,
6367 NODE_MATCH3,
6368 NODE_LIT,
6369 NODE_STR,
6370 NODE_DSTR,
6371 NODE_XSTR,
6372 NODE_DXSTR,
6373 NODE_EVSTR,
6374 NODE_DREGX,
6375 NODE_ONCE,
6376 NODE_ARGS,
6377 NODE_ARGS_AUX,
6378 NODE_OPT_ARG,
6379 NODE_KW_ARG,
6380 NODE_POSTARG,
6381 NODE_ARGSCAT,
6382 NODE_ARGSPUSH,
6383 NODE_SPLAT,
6384 NODE_BLOCK_PASS,
6385 NODE_DEFN,
6386 NODE_DEFS,
6387 NODE_ALIAS,
6388 NODE_VALIAS,
6389 NODE_UNDEF,
6390 NODE_CLASS,
6391 NODE_MODULE,
6392 NODE_SCLASS,
6393 NODE_COLON2,
6394 NODE_COLON3,
6395 NODE_DOT2,
6396 NODE_DOT3,
6397 NODE_FLIP2,
6398 NODE_FLIP3,
6399 NODE_SELF,
6400 NODE_NIL,
6401 NODE_TRUE,
6402 NODE_FALSE,
6403 NODE_ERRINFO,
6404 NODE_DEFINED,
6405 NODE_POSTEXE,
6406 NODE_DSYM,
6407 NODE_ATTRASGN,
6408 NODE_LAMBDA,
6409 NODE_LAST
6410};
6412 int lineno;
6413 int column;
6416 rb_code_position_t beg_pos;
6417 rb_code_position_t end_pos;
6419static inline rb_code_location_t code_loc_gen(rb_code_location_t *loc1, rb_code_location_t *loc2)
6420{
6422 loc.beg_pos = loc1->beg_pos;
6423 loc.end_pos = loc2->end_pos;
6424 return loc;
6425}
6426typedef struct RNode {
6427 VALUE flags;
6428 union {
6429 struct RNode *node;
6430 ID id;
6431 VALUE value;
6432 ID *tbl;
6433 } u1;
6434 union {
6435 struct RNode *node;
6436 ID id;
6437 long argc;
6438 VALUE value;
6439 } u2;
6440 union {
6441 struct RNode *node;
6442 ID id;
6443 long state;
6444 struct rb_global_entry *entry;
6445 struct rb_args_info *args;
6446 VALUE value;
6447 } u3;
6448 rb_code_location_t nd_loc;
6449 int node_id;
6450} NODE;
6451
6452
6453typedef struct node_buffer_struct node_buffer_t;
6454typedef struct rb_ast_body_struct {
6455 const NODE *root;
6456 VALUE compile_option;
6457 int line_count;
6459typedef struct rb_ast_struct {
6460 VALUE flags;
6461 node_buffer_t *node_buffer;
6462 rb_ast_body_t body;
6463} rb_ast_t;
6464rb_ast_t *rb_ast_new(void);
6465void rb_ast_mark(rb_ast_t*);
6466void rb_ast_dispose(rb_ast_t*);
6467void rb_ast_free(rb_ast_t*);
6468void rb_ast_add_mark_object(rb_ast_t*, VALUE);
6469NODE *rb_ast_newnode(rb_ast_t*);
6470void rb_ast_delete_node(rb_ast_t*, NODE *n);
6471VALUE rb_parser_new(void);
6472VALUE rb_parser_end_seen_p(VALUE);
6473VALUE rb_parser_encoding(VALUE);
6474VALUE rb_parser_get_yydebug(VALUE);
6475VALUE rb_parser_set_yydebug(VALUE, VALUE);
6476VALUE rb_parser_dump_tree(const NODE *node, int comment);
6477void rb_parser_set_options(VALUE, int, int, int, int);
6478rb_ast_t *rb_parser_compile_cstr(VALUE, const char*, const char*, int, int);
6479rb_ast_t *rb_parser_compile_string(VALUE, const char*, VALUE, int);
6480rb_ast_t *rb_parser_compile_file(VALUE, const char*, VALUE, int);
6481rb_ast_t *rb_parser_compile_string_path(VALUE vparser, VALUE fname, VALUE src, int line);
6482rb_ast_t *rb_parser_compile_file_path(VALUE vparser, VALUE fname, VALUE input, int line);
6483rb_ast_t *rb_parser_compile_generic(VALUE vparser, VALUE (*lex_gets)(VALUE, int), VALUE fname, VALUE input, int line);
6484rb_ast_t *rb_compile_cstr(const char*, const char*, int, int);
6485rb_ast_t *rb_compile_string(const char*, VALUE, int);
6486rb_ast_t *rb_compile_file(const char*, VALUE, int);
6487void rb_node_init(NODE *n, enum node_type type, VALUE a0, VALUE a1, VALUE a2);
6488const struct kwtable *rb_reserved_word(const char *, unsigned int);
6490 NODE *pre_init;
6491 NODE *post_init;
6492 int pre_args_num;
6493 int post_args_num;
6494 ID first_post_arg;
6495 ID rest_arg;
6496 ID block_arg;
6497 NODE *kw_args;
6498 NODE *kw_rest_arg;
6499 NODE *opt_args;
6500};
6501struct parser_params;
6502void *rb_parser_malloc(struct parser_params *, size_t);
6503void *rb_parser_realloc(struct parser_params *, void *, size_t);
6504void *rb_parser_calloc(struct parser_params *, size_t, size_t);
6505void rb_parser_free(struct parser_params *, void *);
6506void rb_parser_printf(struct parser_params *parser, const char *fmt, ...) __attribute__((format(printf, 2, 3)));
6507
6508
6509enum ruby_id_types {
6510 RUBY_ID_STATIC_SYM = 0x01,
6511 RUBY_ID_LOCAL = 0x00,
6512 RUBY_ID_INSTANCE = (0x01<<1),
6513 RUBY_ID_GLOBAL = (0x03<<1),
6514 RUBY_ID_ATTRSET = (0x04<<1),
6515 RUBY_ID_CONST = (0x05<<1),
6516 RUBY_ID_CLASS = (0x06<<1),
6517 RUBY_ID_JUNK = (0x07<<1),
6518 RUBY_ID_INTERNAL = RUBY_ID_JUNK,
6519 RUBY_ID_SCOPE_SHIFT = 4,
6520 RUBY_ID_SCOPE_MASK = (~(~0U<<(RUBY_ID_SCOPE_SHIFT-1))<<1)
6521};
6522enum ruby_method_ids {
6523 idDot2 = 128,
6524 idDot3 = 129,
6525 idUPlus = 130,
6526 idUMinus = 131,
6527 idPow = 132,
6528 idCmp = 133,
6529 idPLUS = '+',
6530 idMINUS = '-',
6531 idMULT = '*',
6532 idDIV = '/',
6533 idMOD = '%',
6534 idLTLT = 134,
6535 idGTGT = 135,
6536 idLT = '<',
6537 idLE = 136,
6538 idGT = '>',
6539 idGE = 137,
6540 idEq = 138,
6541 idEqq = 139,
6542 idNeq = 140,
6543 idNot = '!',
6544 idAnd = '&',
6545 idOr = '|',
6546 idBackquote = '`',
6547 idEqTilde = 141,
6548 idNeqTilde = 142,
6549 idAREF = 143,
6550 idASET = 144,
6551 idCOLON2 = 145,
6552 idANDOP = 146,
6553 idOROP = 147,
6554 idANDDOT = 148,
6555 tPRESERVED_ID_BEGIN = 148,
6556 idNULL,
6557 idEmptyP,
6558 idEqlP,
6559 idRespond_to,
6560 idRespond_to_missing,
6561 idIFUNC,
6562 idCFUNC,
6563 id_core_set_method_alias,
6564 id_core_set_variable_alias,
6565 id_core_undef_method,
6566 id_core_define_method,
6567 id_core_define_singleton_method,
6568 id_core_set_postexe,
6569 id_core_hash_merge_ptr,
6570 id_core_hash_merge_kwd,
6571 id_debug_created_info,
6572 tPRESERVED_ID_END,
6573 tTOKEN_LOCAL_BEGIN = tPRESERVED_ID_END-1,
6574 tMax,
6575 tMin,
6576 tFreeze,
6577 tInspect,
6578 tIntern,
6579 tObject_id,
6580 tConst_missing,
6581 tMethodMissing,
6582 tMethod_added,
6583 tSingleton_method_added,
6584 tMethod_removed,
6585 tSingleton_method_removed,
6586 tMethod_undefined,
6587 tSingleton_method_undefined,
6588 tLength,
6589 tSize,
6590 tGets,
6591 tSucc,
6592 tEach,
6593 tProc,
6594 tLambda,
6595 tSend,
6596 t__send__,
6597 t__attached__,
6598 tInitialize,
6599 tInitialize_copy,
6600 tInitialize_clone,
6601 tInitialize_dup,
6602 tTo_int,
6603 tTo_ary,
6604 tTo_str,
6605 tTo_sym,
6606 tTo_hash,
6607 tTo_proc,
6608 tTo_io,
6609 tTo_a,
6610 tTo_s,
6611 tTo_i,
6612 tTo_f,
6613 tTo_r,
6614 tBt,
6615 tBt_locations,
6616 tCall,
6617 tMesg,
6618 tException,
6619 tNOT,
6620 tAND,
6621 tOR,
6622 tUScore,
6623 tTOKEN_LOCAL_END,
6624 tTOKEN_INSTANCE_BEGIN = tTOKEN_LOCAL_END-1,
6625 tTOKEN_INSTANCE_END,
6626 tTOKEN_GLOBAL_BEGIN = tTOKEN_INSTANCE_END-1,
6627 tLASTLINE,
6628 tBACKREF,
6629 tTOKEN_GLOBAL_END,
6630 tTOKEN_CONST_BEGIN = tTOKEN_GLOBAL_END-1,
6631 tTOKEN_CONST_END,
6632 tTOKEN_CLASS_BEGIN = tTOKEN_CONST_END-1,
6633 tTOKEN_CLASS_END,
6634 tTOKEN_ATTRSET_BEGIN = tTOKEN_CLASS_END-1,
6635 tTOKEN_ATTRSET_END,
6636 tNEXT_ID = tTOKEN_ATTRSET_END,
6637 idMax = ((tMax<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6638 idMin = ((tMin<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6639 idFreeze = ((tFreeze<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6640 idInspect = ((tInspect<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6641 idIntern = ((tIntern<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6642 idObject_id = ((tObject_id<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6643 idConst_missing = ((tConst_missing<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6644 idMethodMissing = ((tMethodMissing<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6645 idMethod_added = ((tMethod_added<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6646 idSingleton_method_added = ((tSingleton_method_added<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6647 idMethod_removed = ((tMethod_removed<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6648 idSingleton_method_removed = ((tSingleton_method_removed<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6649 idMethod_undefined = ((tMethod_undefined<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6650 idSingleton_method_undefined = ((tSingleton_method_undefined<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6651 idLength = ((tLength<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6652 idSize = ((tSize<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6653 idGets = ((tGets<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6654 idSucc = ((tSucc<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6655 idEach = ((tEach<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6656 idProc = ((tProc<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6657 idLambda = ((tLambda<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6658 idSend = ((tSend<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6659 id__send__ = ((t__send__<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6660 id__attached__ = ((t__attached__<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6661 idInitialize = ((tInitialize<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6662 idInitialize_copy = ((tInitialize_copy<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6663 idInitialize_clone = ((tInitialize_clone<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6664 idInitialize_dup = ((tInitialize_dup<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6665 idTo_int = ((tTo_int<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6666 idTo_ary = ((tTo_ary<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6667 idTo_str = ((tTo_str<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6668 idTo_sym = ((tTo_sym<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6669 idTo_hash = ((tTo_hash<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6670 idTo_proc = ((tTo_proc<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6671 idTo_io = ((tTo_io<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6672 idTo_a = ((tTo_a<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6673 idTo_s = ((tTo_s<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6674 idTo_i = ((tTo_i<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6675 idTo_f = ((tTo_f<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6676 idTo_r = ((tTo_r<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6677 idBt = ((tBt<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6678 idBt_locations = ((tBt_locations<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6679 idCall = ((tCall<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6680 idMesg = ((tMesg<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6681 idException = ((tException<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6682 idNOT = ((tNOT<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6683 idAND = ((tAND<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6684 idOR = ((tOR<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6685 idUScore = ((tUScore<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6686 idLASTLINE = ((tLASTLINE<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_GLOBAL|RUBY_ID_STATIC_SYM),
6687 idBACKREF = ((tBACKREF<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_GLOBAL|RUBY_ID_STATIC_SYM),
6688 tLAST_OP_ID = tPRESERVED_ID_END-1,
6689 idLAST_OP_ID = tLAST_OP_ID >> RUBY_ID_SCOPE_SHIFT
6690};
6691typedef enum {
6692 METHOD_VISI_UNDEF = 0x00,
6693 METHOD_VISI_PUBLIC = 0x01,
6694 METHOD_VISI_PRIVATE = 0x02,
6695 METHOD_VISI_PROTECTED = 0x03,
6696 METHOD_VISI_MASK = 0x03
6697} rb_method_visibility_t;
6698typedef struct rb_scope_visi_struct {
6699 rb_method_visibility_t method_visi : 3;
6700 unsigned int module_func : 1;
6702typedef struct rb_cref_struct {
6703 VALUE flags;
6704 const VALUE refinements;
6705 const VALUE klass;
6706 struct rb_cref_struct * const next;
6707 const rb_scope_visibility_t scope_visi;
6708} rb_cref_t;
6710 VALUE flags;
6711 const VALUE defined_class;
6712 struct rb_method_definition_struct * const def;
6713 ID called_id;
6714 const VALUE owner;
6717 VALUE flags;
6718 const VALUE defined_class;
6719 struct rb_method_definition_struct * const def;
6720 ID called_id;
6721 const VALUE owner;
6723static inline void
6724METHOD_ENTRY_VISI_SET(rb_method_entry_t *me, rb_method_visibility_t visi)
6725{
6726 ((void)0);
6727 me->flags = (me->flags & ~(((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5))) | (visi << ((((VALUE)RUBY_FL_USHIFT) + 4)+0));
6728}
6729static inline void
6730METHOD_ENTRY_BASIC_SET(rb_method_entry_t *me, unsigned int basic)
6731{
6732 ((void)0);
6733 me->flags = (me->flags & ~(((VALUE)RUBY_FL_USER6) )) | (basic << ((((VALUE)RUBY_FL_USHIFT) + 4)+2));
6734}
6735static inline void
6736METHOD_ENTRY_FLAGS_SET(rb_method_entry_t *me, rb_method_visibility_t visi, unsigned int basic)
6737{
6738 ((void)0);
6739 ((void)0);
6740 me->flags =
6741 (me->flags & ~(((VALUE)RUBY_FL_USER4)|((VALUE)RUBY_FL_USER5)|((VALUE)RUBY_FL_USER6))) |
6742 ((visi << ((((VALUE)RUBY_FL_USHIFT) + 4)+0)) | (basic << ((((VALUE)RUBY_FL_USHIFT) + 4)+2)));
6743}
6744static inline void
6745METHOD_ENTRY_FLAGS_COPY(rb_method_entry_t *dst, const rb_method_entry_t *src)
6746{
6747 dst->flags =
6748 (dst->flags & ~(((VALUE)RUBY_FL_USER4)|((VALUE)RUBY_FL_USER5)|((VALUE)RUBY_FL_USER6))) |
6749 (src->flags & (((VALUE)RUBY_FL_USER4)|((VALUE)RUBY_FL_USER5)|((VALUE)RUBY_FL_USER6)));
6750}
6751typedef enum {
6752 VM_METHOD_TYPE_ISEQ,
6753 VM_METHOD_TYPE_CFUNC,
6754 VM_METHOD_TYPE_ATTRSET,
6755 VM_METHOD_TYPE_IVAR,
6756 VM_METHOD_TYPE_BMETHOD,
6757 VM_METHOD_TYPE_ZSUPER,
6758 VM_METHOD_TYPE_ALIAS,
6759 VM_METHOD_TYPE_UNDEF,
6760 VM_METHOD_TYPE_NOTIMPLEMENTED,
6761 VM_METHOD_TYPE_OPTIMIZED,
6762 VM_METHOD_TYPE_MISSING,
6763 VM_METHOD_TYPE_REFINED,
6764
6765} rb_method_type_t;
6766typedef struct rb_iseq_struct rb_iseq_t;
6768 const rb_iseq_t * const iseqptr;
6772 VALUE (*func)();
6773 VALUE (*invoker)(VALUE (*func)(), VALUE recv, int argc, const VALUE *argv);
6774 int argc;
6777 ID id;
6778 const VALUE location;
6781 const struct rb_method_entry_struct * const original_me;
6784 const struct rb_method_entry_struct * const orig_me;
6785 const VALUE owner;
6788 const VALUE proc;
6789 struct rb_hook_list_struct *hooks;
6791enum method_optimized_type {
6792 OPTIMIZED_METHOD_TYPE_SEND,
6793 OPTIMIZED_METHOD_TYPE_CALL,
6794 OPTIMIZED_METHOD_TYPE_BLOCK_CALL,
6795 OPTIMIZED_METHOD_TYPE__MAX
6796};
6797struct rb_method_definition_struct { rb_method_type_t type : 4; int alias_count : 28; int complemented_count : 28; union { rb_method_iseq_t iseq; rb_method_cfunc_t cfunc; rb_method_attr_t attr; rb_method_alias_t alias; rb_method_refined_t refined; rb_method_bmethod_t bmethod; enum method_optimized_type optimize_type; } body; ID original_id; } __attribute__((packed));
6799void rb_add_method_cfunc(VALUE klass, ID mid, VALUE (*func)(), int argc, rb_method_visibility_t visi);
6800void rb_add_method_iseq(VALUE klass, ID mid, const rb_iseq_t *iseq, rb_cref_t *cref, rb_method_visibility_t visi);
6801void rb_add_refined_method_entry(VALUE refined_class, ID mid);
6802rb_method_entry_t *rb_add_method(VALUE klass, ID mid, rb_method_type_t type, void *option, rb_method_visibility_t visi);
6803rb_method_entry_t *rb_method_entry_set(VALUE klass, ID mid, const rb_method_entry_t *, rb_method_visibility_t noex);
6804rb_method_entry_t *rb_method_entry_create(ID called_id, VALUE klass, rb_method_visibility_t visi, const rb_method_definition_t *def);
6805const rb_method_entry_t *rb_method_entry_at(VALUE obj, ID id);
6806const rb_method_entry_t *rb_method_entry(VALUE klass, ID id);
6807const rb_method_entry_t *rb_method_entry_without_refinements(VALUE klass, ID id, VALUE *defined_class);
6808const rb_method_entry_t *rb_resolve_refined_method(VALUE refinements, const rb_method_entry_t *me);
6809
6810
6811const rb_callable_method_entry_t *rb_resolve_refined_method_callable(VALUE refinements, const rb_callable_method_entry_t *me);
6812const rb_method_entry_t *rb_resolve_me_location(const rb_method_entry_t *, VALUE[5]);
6813
6814
6815const rb_callable_method_entry_t *rb_callable_method_entry(VALUE klass, ID id);
6816const rb_callable_method_entry_t *rb_callable_method_entry_with_refinements(VALUE klass, ID id, VALUE *defined_class);
6817const rb_callable_method_entry_t *rb_callable_method_entry_without_refinements(VALUE klass, ID id, VALUE *defined_class);
6818int rb_method_entry_arity(const rb_method_entry_t *me);
6819int rb_method_entry_eq(const rb_method_entry_t *m1, const rb_method_entry_t *m2);
6820st_index_t rb_hash_method_entry(st_index_t hash, const rb_method_entry_t *me);
6821VALUE rb_method_entry_location(const rb_method_entry_t *me);
6822VALUE rb_mod_method_location(VALUE mod, ID id);
6823VALUE rb_obj_method_location(VALUE obj, ID id);
6824void rb_free_method_entry(const rb_method_entry_t *me);
6825void rb_sweep_method_entry(void *vm);
6826const rb_method_entry_t *rb_method_entry_clone(const rb_method_entry_t *me);
6827const rb_callable_method_entry_t *rb_method_entry_complement_defined_class(const rb_method_entry_t *src_me, ID called_id, VALUE defined_class);
6828void rb_method_entry_copy(rb_method_entry_t *dst, const rb_method_entry_t *src);
6829void rb_scope_visibility_set(rb_method_visibility_t);
6830VALUE rb_unnamed_parameters(int arity);
6831typedef unsigned int rb_atomic_t;
6832
6833extern void __assert_fail (const char *__assertion, const char *__file,
6834 unsigned int __line, const char *__function)
6835 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
6836extern void __assert_perror_fail (int __errnum, const char *__file,
6837 unsigned int __line, const char *__function)
6838 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
6839extern void __assert (const char *__assertion, const char *__file, int __line)
6840 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
6841
6842static inline char *container_of_or_null_(void *member_ptr, size_t offset)
6843{
6844 return member_ptr ? (char *)member_ptr - offset : ((void *)0);
6845}
6847{
6848 struct list_node *next, *prev;
6849};
6851{
6852 struct list_node n;
6853};
6854static inline void list_head_init(struct list_head *h)
6855{
6856 h->n.next = h->n.prev = &h->n;
6857}
6858static inline void list_node_init(struct list_node *n)
6859{
6860 n->next = n->prev = n;
6861}
6862static inline void list_add_after_(struct list_head *h,
6863 struct list_node *p,
6864 struct list_node *n,
6865 const char *abortstr)
6866{
6867 n->next = p->next;
6868 n->prev = p;
6869 p->next->prev = n;
6870 p->next = n;
6871 (void)((void)abortstr, h);
6872}
6873static inline void list_add_(struct list_head *h,
6874 struct list_node *n,
6875 const char *abortstr)
6876{
6877 list_add_after_(h, &h->n, n, abortstr);
6878}
6879static inline void list_add_before_(struct list_head *h,
6880 struct list_node *p,
6881 struct list_node *n,
6882 const char *abortstr)
6883{
6884 n->next = p;
6885 n->prev = p->prev;
6886 p->prev->next = n;
6887 p->prev = n;
6888 (void)((void)abortstr, h);
6889}
6890static inline void list_add_tail_(struct list_head *h,
6891 struct list_node *n,
6892 const char *abortstr)
6893{
6894 list_add_before_(h, &h->n, n, abortstr);
6895}
6896static inline int list_empty_(const struct list_head *h, const char* abortstr)
6897{
6898 (void)((void)abortstr, h);
6899 return h->n.next == &h->n;
6900}
6901static inline _Bool list_empty_nocheck(const struct list_head *h)
6902{
6903 return h->n.next == &h->n;
6904}
6905static inline void list_del_(struct list_node *n, const char* abortstr)
6906{
6907 (void)((void)abortstr, n);
6908 n->next->prev = n->prev;
6909 n->prev->next = n->next;
6910}
6911static inline void list_del_init_(struct list_node *n, const char *abortstr)
6912{
6913 list_del_(n, abortstr);
6914 list_node_init(n);
6915}
6916static inline void list_del_from(struct list_head *h, struct list_node *n)
6917{
6918 ((void) sizeof ((!list_empty_(h, "./ccan/list/list.h" ":" "328")) ? 1 : 0), __extension__ ({ if (!list_empty_(h, "./ccan/list/list.h" ":" "328")) ; else __assert_fail ("!list_empty(h)", "./ccan/list/list.h", 328, __extension__ __PRETTY_FUNCTION__); }));
6919 list_del_(n, "./ccan/list/list.h" ":" "329");
6920}
6921static inline void list_swap_(struct list_node *o,
6922 struct list_node *n,
6923 const char* abortstr)
6924{
6925 (void)((void)abortstr, o);
6926 *n = *o;
6927 n->next->prev = n;
6928 n->prev->next = n;
6929}
6930static inline const void *list_top_(const struct list_head *h, size_t off)
6931{
6932 if (list_empty_(h, "./ccan/list/list.h" ":" "399"))
6933 return ((void *)0);
6934 return (const char *)h->n.next - off;
6935}
6936static inline const void *list_pop_(const struct list_head *h, size_t off)
6937{
6938 struct list_node *n;
6939 if (list_empty_(h, "./ccan/list/list.h" ":" "425"))
6940 return ((void *)0);
6941 n = h->n.next;
6942 list_del_(n, "./ccan/list/list.h" ":" "428");
6943 return (const char *)n - off;
6944}
6945static inline const void *list_tail_(const struct list_head *h, size_t off)
6946{
6947 if (list_empty_(h, "./ccan/list/list.h" ":" "451"))
6948 return ((void *)0);
6949 return (const char *)h->n.prev - off;
6950}
6951static inline void list_append_list_(struct list_head *to,
6952 struct list_head *from,
6953 const char *abortstr)
6954{
6955 struct list_node *from_tail = ((void)abortstr, from)->n.prev;
6956 struct list_node *to_tail = ((void)abortstr, to)->n.prev;
6957 to->n.prev = from_tail;
6958 from_tail->next = &to->n;
6959 to_tail->next = &from->n;
6960 from->n.prev = to_tail;
6961 list_del_(&from->n, "./ccan/list/list.h" ":" "600");
6962 list_head_init(from);
6963}
6964static inline void list_prepend_list_(struct list_head *to,
6965 struct list_head *from,
6966 const char *abortstr)
6967{
6968 struct list_node *from_tail = ((void)abortstr, from)->n.prev;
6969 struct list_node *to_head = ((void)abortstr, to)->n.next;
6970 to->n.next = &from->n;
6971 from->n.prev = &to->n;
6972 to_head->prev = from_tail;
6973 from_tail->next = to_head;
6974 list_del_(&from->n, "./ccan/list/list.h" ":" "632");
6975 list_head_init(from);
6976}
6977static inline void *list_node_to_off_(struct list_node *node, size_t off)
6978{
6979 return (void *)((char *)node - off);
6980}
6981static inline struct list_node *list_node_from_off_(void *ptr, size_t off)
6982{
6983 return (struct list_node *)((char *)ptr + off);
6984}
6985static inline void *list_entry_or_null(const struct list_head *h,
6986 const struct list_node *n,
6987 size_t off)
6988{
6989 if (n == &h->n)
6990 return ((void *)0);
6991 return (char *)n - off;
6992}
6994{
6995 int sched_priority;
6996};
6997
6998extern int clone (int (*__fn) (void *__arg), void *__child_stack,
6999 int __flags, void *__arg, ...) __attribute__ ((__nothrow__ , __leaf__));
7000extern int unshare (int __flags) __attribute__ ((__nothrow__ , __leaf__));
7001extern int sched_getcpu (void) __attribute__ ((__nothrow__ , __leaf__));
7002extern int getcpu (unsigned int *, unsigned int *) __attribute__ ((__nothrow__ , __leaf__));
7003extern int setns (int __fd, int __nstype) __attribute__ ((__nothrow__ , __leaf__));
7004
7005typedef unsigned long int __cpu_mask;
7006typedef struct
7007{
7008 __cpu_mask __bits[1024 / (8 * sizeof (__cpu_mask))];
7009} cpu_set_t;
7010
7011extern int __sched_cpucount (size_t __setsize, const cpu_set_t *__setp)
7012 __attribute__ ((__nothrow__ , __leaf__));
7013extern cpu_set_t *__sched_cpualloc (size_t __count) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
7014extern void __sched_cpufree (cpu_set_t *__set) __attribute__ ((__nothrow__ , __leaf__));
7015
7016
7017extern int sched_setparam (__pid_t __pid, const struct sched_param *__param)
7018 __attribute__ ((__nothrow__ , __leaf__));
7019extern int sched_getparam (__pid_t __pid, struct sched_param *__param) __attribute__ ((__nothrow__ , __leaf__));
7020extern int sched_setscheduler (__pid_t __pid, int __policy,
7021 const struct sched_param *__param) __attribute__ ((__nothrow__ , __leaf__));
7022extern int sched_getscheduler (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__));
7023extern int sched_yield (void) __attribute__ ((__nothrow__ , __leaf__));
7024extern int sched_get_priority_max (int __algorithm) __attribute__ ((__nothrow__ , __leaf__));
7025extern int sched_get_priority_min (int __algorithm) __attribute__ ((__nothrow__ , __leaf__));
7026extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) __attribute__ ((__nothrow__ , __leaf__));
7027extern int sched_setaffinity (__pid_t __pid, size_t __cpusetsize,
7028 const cpu_set_t *__cpuset) __attribute__ ((__nothrow__ , __leaf__));
7029extern int sched_getaffinity (__pid_t __pid, size_t __cpusetsize,
7030 cpu_set_t *__cpuset) __attribute__ ((__nothrow__ , __leaf__));
7031
7032struct timex
7033{
7034 unsigned int modes;
7035 __syscall_slong_t offset;
7036 __syscall_slong_t freq;
7037 __syscall_slong_t maxerror;
7038 __syscall_slong_t esterror;
7039 int status;
7040 __syscall_slong_t constant;
7041 __syscall_slong_t precision;
7042 __syscall_slong_t tolerance;
7043 struct timeval time;
7044 __syscall_slong_t tick;
7045 __syscall_slong_t ppsfreq;
7046 __syscall_slong_t jitter;
7047 int shift;
7048 __syscall_slong_t stabil;
7049 __syscall_slong_t jitcnt;
7050 __syscall_slong_t calcnt;
7051 __syscall_slong_t errcnt;
7052 __syscall_slong_t stbcnt;
7053 int tai;
7054 int :32; int :32; int :32; int :32;
7055 int :32; int :32; int :32; int :32;
7056 int :32; int :32; int :32;
7057};
7058
7059extern int clock_adjtime (__clockid_t __clock_id, struct timex *__utx) __attribute__ ((__nothrow__ , __leaf__));
7060
7061struct tm
7062{
7063 int tm_sec;
7064 int tm_min;
7065 int tm_hour;
7066 int tm_mday;
7067 int tm_mon;
7068 int tm_year;
7069 int tm_wday;
7070 int tm_yday;
7071 int tm_isdst;
7072 long int tm_gmtoff;
7073 const char *tm_zone;
7074};
7076 {
7077 struct timespec it_interval;
7078 struct timespec it_value;
7079 };
7080struct sigevent;
7081
7082extern clock_t clock (void) __attribute__ ((__nothrow__ , __leaf__));
7083extern time_t time (time_t *__timer) __attribute__ ((__nothrow__ , __leaf__));
7084extern double difftime (time_t __time1, time_t __time0)
7085 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
7086extern time_t mktime (struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__));
7087extern size_t strftime (char *__restrict __s, size_t __maxsize,
7088 const char *__restrict __format,
7089 const struct tm *__restrict __tp) __attribute__ ((__nothrow__ , __leaf__));
7090extern char *strptime (const char *__restrict __s,
7091 const char *__restrict __fmt, struct tm *__tp)
7092 __attribute__ ((__nothrow__ , __leaf__));
7093extern size_t strftime_l (char *__restrict __s, size_t __maxsize,
7094 const char *__restrict __format,
7095 const struct tm *__restrict __tp,
7096 locale_t __loc) __attribute__ ((__nothrow__ , __leaf__));
7097extern char *strptime_l (const char *__restrict __s,
7098 const char *__restrict __fmt, struct tm *__tp,
7099 locale_t __loc) __attribute__ ((__nothrow__ , __leaf__));
7100extern struct tm *gmtime (const time_t *__timer) __attribute__ ((__nothrow__ , __leaf__));
7101extern struct tm *localtime (const time_t *__timer) __attribute__ ((__nothrow__ , __leaf__));
7102extern struct tm *gmtime_r (const time_t *__restrict __timer,
7103 struct tm *__restrict __tp) __attribute__ ((__nothrow__ , __leaf__));
7104extern struct tm *localtime_r (const time_t *__restrict __timer,
7105 struct tm *__restrict __tp) __attribute__ ((__nothrow__ , __leaf__));
7106extern char *asctime (const struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__));
7107extern char *ctime (const time_t *__timer) __attribute__ ((__nothrow__ , __leaf__));
7108extern char *asctime_r (const struct tm *__restrict __tp,
7109 char *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__));
7110extern char *ctime_r (const time_t *__restrict __timer,
7111 char *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__));
7112extern char *__tzname[2];
7113extern int __daylight;
7114extern long int __timezone;
7115extern char *tzname[2];
7116extern void tzset (void) __attribute__ ((__nothrow__ , __leaf__));
7117extern int daylight;
7118extern long int timezone;
7119extern time_t timegm (struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__));
7120extern time_t timelocal (struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__));
7121extern int dysize (int __year) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
7122extern int nanosleep (const struct timespec *__requested_time,
7123 struct timespec *__remaining);
7124extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __attribute__ ((__nothrow__ , __leaf__));
7125extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __attribute__ ((__nothrow__ , __leaf__));
7126extern int clock_settime (clockid_t __clock_id, const struct timespec *__tp)
7127 __attribute__ ((__nothrow__ , __leaf__));
7128extern int clock_nanosleep (clockid_t __clock_id, int __flags,
7129 const struct timespec *__req,
7130 struct timespec *__rem);
7131extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __attribute__ ((__nothrow__ , __leaf__));
7132extern int timer_create (clockid_t __clock_id,
7133 struct sigevent *__restrict __evp,
7134 timer_t *__restrict __timerid) __attribute__ ((__nothrow__ , __leaf__));
7135extern int timer_delete (timer_t __timerid) __attribute__ ((__nothrow__ , __leaf__));
7136extern int timer_settime (timer_t __timerid, int __flags,
7137 const struct itimerspec *__restrict __value,
7138 struct itimerspec *__restrict __ovalue) __attribute__ ((__nothrow__ , __leaf__));
7139extern int timer_gettime (timer_t __timerid, struct itimerspec *__value)
7140 __attribute__ ((__nothrow__ , __leaf__));
7141extern int timer_getoverrun (timer_t __timerid) __attribute__ ((__nothrow__ , __leaf__));
7142extern int timespec_get (struct timespec *__ts, int __base)
7143 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7144extern int getdate_err;
7145extern struct tm *getdate (const char *__string);
7146extern int getdate_r (const char *__restrict __string,
7147 struct tm *__restrict __resbufp);
7148
7149typedef long int __jmp_buf[8];
7150enum
7151{
7152 PTHREAD_CREATE_JOINABLE,
7153 PTHREAD_CREATE_DETACHED
7154};
7155enum
7156{
7157 PTHREAD_MUTEX_TIMED_NP,
7158 PTHREAD_MUTEX_RECURSIVE_NP,
7159 PTHREAD_MUTEX_ERRORCHECK_NP,
7160 PTHREAD_MUTEX_ADAPTIVE_NP
7161 ,
7162 PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP,
7163 PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP,
7164 PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP,
7165 PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL
7166 , PTHREAD_MUTEX_FAST_NP = PTHREAD_MUTEX_TIMED_NP
7167};
7168enum
7169{
7170 PTHREAD_MUTEX_STALLED,
7171 PTHREAD_MUTEX_STALLED_NP = PTHREAD_MUTEX_STALLED,
7172 PTHREAD_MUTEX_ROBUST,
7173 PTHREAD_MUTEX_ROBUST_NP = PTHREAD_MUTEX_ROBUST
7174};
7175enum
7176{
7177 PTHREAD_PRIO_NONE,
7178 PTHREAD_PRIO_INHERIT,
7179 PTHREAD_PRIO_PROTECT
7180};
7181enum
7182{
7183 PTHREAD_RWLOCK_PREFER_READER_NP,
7184 PTHREAD_RWLOCK_PREFER_WRITER_NP,
7185 PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP,
7186 PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP
7187};
7188enum
7189{
7190 PTHREAD_INHERIT_SCHED,
7191 PTHREAD_EXPLICIT_SCHED
7192};
7193enum
7194{
7195 PTHREAD_SCOPE_SYSTEM,
7196 PTHREAD_SCOPE_PROCESS
7197};
7198enum
7199{
7200 PTHREAD_PROCESS_PRIVATE,
7201 PTHREAD_PROCESS_SHARED
7202};
7204{
7205 void (*__routine) (void *);
7206 void *__arg;
7207 int __canceltype;
7208 struct _pthread_cleanup_buffer *__prev;
7209};
7210enum
7211{
7212 PTHREAD_CANCEL_ENABLE,
7213 PTHREAD_CANCEL_DISABLE
7214};
7215enum
7216{
7217 PTHREAD_CANCEL_DEFERRED,
7218 PTHREAD_CANCEL_ASYNCHRONOUS
7219};
7220
7221extern int pthread_create (pthread_t *__restrict __newthread,
7222 const pthread_attr_t *__restrict __attr,
7223 void *(*__start_routine) (void *),
7224 void *__restrict __arg) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3)));
7225extern void pthread_exit (void *__retval) __attribute__ ((__noreturn__));
7226extern int pthread_join (pthread_t __th, void **__thread_return);
7227extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) __attribute__ ((__nothrow__ , __leaf__));
7228extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return,
7229 const struct timespec *__abstime);
7230extern int pthread_clockjoin_np (pthread_t __th, void **__thread_return,
7231 clockid_t __clockid,
7232 const struct timespec *__abstime);
7233extern int pthread_detach (pthread_t __th) __attribute__ ((__nothrow__ , __leaf__));
7234extern pthread_t pthread_self (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
7235extern int pthread_equal (pthread_t __thread1, pthread_t __thread2)
7236 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
7237extern int pthread_attr_init (pthread_attr_t *__attr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7238extern int pthread_attr_destroy (pthread_attr_t *__attr)
7239 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7240extern int pthread_attr_getdetachstate (const pthread_attr_t *__attr,
7241 int *__detachstate)
7242 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
7243extern int pthread_attr_setdetachstate (pthread_attr_t *__attr,
7244 int __detachstate)
7245 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7246extern int pthread_attr_getguardsize (const pthread_attr_t *__attr,
7247 size_t *__guardsize)
7248 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
7249extern int pthread_attr_setguardsize (pthread_attr_t *__attr,
7250 size_t __guardsize)
7251 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7252extern int pthread_attr_getschedparam (const pthread_attr_t *__restrict __attr,
7253 struct sched_param *__restrict __param)
7254 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
7255extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr,
7256 const struct sched_param *__restrict
7257 __param) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
7258extern int pthread_attr_getschedpolicy (const pthread_attr_t *__restrict
7259 __attr, int *__restrict __policy)
7260 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
7261extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy)
7262 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7263extern int pthread_attr_getinheritsched (const pthread_attr_t *__restrict
7264 __attr, int *__restrict __inherit)
7265 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
7266extern int pthread_attr_setinheritsched (pthread_attr_t *__attr,
7267 int __inherit)
7268 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7269extern int pthread_attr_getscope (const pthread_attr_t *__restrict __attr,
7270 int *__restrict __scope)
7271 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
7272extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope)
7273 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7274extern int pthread_attr_getstackaddr (const pthread_attr_t *__restrict
7275 __attr, void **__restrict __stackaddr)
7276 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__deprecated__));
7277extern int pthread_attr_setstackaddr (pthread_attr_t *__attr,
7278 void *__stackaddr)
7279 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__));
7280extern int pthread_attr_getstacksize (const pthread_attr_t *__restrict
7281 __attr, size_t *__restrict __stacksize)
7282 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
7283extern int pthread_attr_setstacksize (pthread_attr_t *__attr,
7284 size_t __stacksize)
7285 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7286extern int pthread_attr_getstack (const pthread_attr_t *__restrict __attr,
7287 void **__restrict __stackaddr,
7288 size_t *__restrict __stacksize)
7289 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2, 3)));
7290extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr,
7291 size_t __stacksize) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7292extern int pthread_attr_setaffinity_np (pthread_attr_t *__attr,
7293 size_t __cpusetsize,
7294 const cpu_set_t *__cpuset)
7295 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3)));
7296extern int pthread_attr_getaffinity_np (const pthread_attr_t *__attr,
7297 size_t __cpusetsize,
7298 cpu_set_t *__cpuset)
7299 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3)));
7300extern int pthread_getattr_default_np (pthread_attr_t *__attr)
7301 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7302extern int pthread_attr_setsigmask_np (pthread_attr_t *__attr,
7303 const __sigset_t *sigmask);
7304extern int pthread_attr_getsigmask_np (const pthread_attr_t *__attr,
7305 __sigset_t *sigmask);
7306extern int pthread_setattr_default_np (const pthread_attr_t *__attr)
7307 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7308extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr)
7309 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
7310extern int pthread_setschedparam (pthread_t __target_thread, int __policy,
7311 const struct sched_param *__param)
7312 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
7313extern int pthread_getschedparam (pthread_t __target_thread,
7314 int *__restrict __policy,
7315 struct sched_param *__restrict __param)
7316 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3)));
7317extern int pthread_setschedprio (pthread_t __target_thread, int __prio)
7318 __attribute__ ((__nothrow__ , __leaf__));
7319extern int pthread_getname_np (pthread_t __target_thread, char *__buf,
7320 size_t __buflen)
7321 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
7322extern int pthread_setname_np (pthread_t __target_thread, const char *__name)
7323 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
7324extern int pthread_getconcurrency (void) __attribute__ ((__nothrow__ , __leaf__));
7325extern int pthread_setconcurrency (int __level) __attribute__ ((__nothrow__ , __leaf__));
7326extern int pthread_yield (void) __attribute__ ((__nothrow__ , __leaf__));
7327extern int pthread_setaffinity_np (pthread_t __th, size_t __cpusetsize,
7328 const cpu_set_t *__cpuset)
7329 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
7330extern int pthread_getaffinity_np (pthread_t __th, size_t __cpusetsize,
7331 cpu_set_t *__cpuset)
7332 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
7333extern int pthread_once (pthread_once_t *__once_control,
7334 void (*__init_routine) (void)) __attribute__ ((__nonnull__ (1, 2)));
7335extern int pthread_setcancelstate (int __state, int *__oldstate);
7336extern int pthread_setcanceltype (int __type, int *__oldtype);
7337extern int pthread_cancel (pthread_t __th);
7338extern void pthread_testcancel (void);
7339typedef struct
7340{
7341 struct
7342 {
7343 __jmp_buf __cancel_jmp_buf;
7344 int __mask_was_saved;
7345 } __cancel_jmp_buf[1];
7346 void *__pad[4];
7347} __pthread_unwind_buf_t __attribute__ ((__aligned__));
7349{
7350 void (*__cancel_routine) (void *);
7351 void *__cancel_arg;
7352 int __do_it;
7353 int __cancel_type;
7354};
7355extern void __pthread_register_cancel (__pthread_unwind_buf_t *__buf)
7356 ;
7357extern void __pthread_unregister_cancel (__pthread_unwind_buf_t *__buf)
7358 ;
7359extern void __pthread_register_cancel_defer (__pthread_unwind_buf_t *__buf)
7360 ;
7361extern void __pthread_unregister_cancel_restore (__pthread_unwind_buf_t *__buf)
7362 ;
7363extern void __pthread_unwind_next (__pthread_unwind_buf_t *__buf)
7364 __attribute__ ((__noreturn__))
7365 __attribute__ ((__weak__))
7366 ;
7367struct __jmp_buf_tag;
7368extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) __attribute__ ((__nothrow__));
7369extern int pthread_mutex_init (pthread_mutex_t *__mutex,
7370 const pthread_mutexattr_t *__mutexattr)
7371 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7372extern int pthread_mutex_destroy (pthread_mutex_t *__mutex)
7373 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7374extern int pthread_mutex_trylock (pthread_mutex_t *__mutex)
7375 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
7376extern int pthread_mutex_lock (pthread_mutex_t *__mutex)
7377 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
7378extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex,
7379 const struct timespec *__restrict
7380 __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
7381extern int pthread_mutex_clocklock (pthread_mutex_t *__restrict __mutex,
7382 clockid_t __clockid,
7383 const struct timespec *__restrict
7384 __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3)));
7385extern int pthread_mutex_unlock (pthread_mutex_t *__mutex)
7386 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
7387extern int pthread_mutex_getprioceiling (const pthread_mutex_t *
7388 __restrict __mutex,
7389 int *__restrict __prioceiling)
7390 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
7391extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex,
7392 int __prioceiling,
7393 int *__restrict __old_ceiling)
7394 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3)));
7395extern int pthread_mutex_consistent (pthread_mutex_t *__mutex)
7396 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7397extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex)
7398 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7399extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr)
7400 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7401extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr)
7402 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7403extern int pthread_mutexattr_getpshared (const pthread_mutexattr_t *
7404 __restrict __attr,
7405 int *__restrict __pshared)
7406 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
7407extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr,
7408 int __pshared)
7409 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7410extern int pthread_mutexattr_gettype (const pthread_mutexattr_t *__restrict
7411 __attr, int *__restrict __kind)
7412 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
7413extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind)
7414 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7415extern int pthread_mutexattr_getprotocol (const pthread_mutexattr_t *
7416 __restrict __attr,
7417 int *__restrict __protocol)
7418 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
7419extern int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr,
7420 int __protocol)
7421 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7422extern int pthread_mutexattr_getprioceiling (const pthread_mutexattr_t *
7423 __restrict __attr,
7424 int *__restrict __prioceiling)
7425 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
7426extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr,
7427 int __prioceiling)
7428 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7429extern int pthread_mutexattr_getrobust (const pthread_mutexattr_t *__attr,
7430 int *__robustness)
7431 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
7432extern int pthread_mutexattr_getrobust_np (const pthread_mutexattr_t *__attr,
7433 int *__robustness)
7434 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
7435extern int pthread_mutexattr_setrobust (pthread_mutexattr_t *__attr,
7436 int __robustness)
7437 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7438extern int pthread_mutexattr_setrobust_np (pthread_mutexattr_t *__attr,
7439 int __robustness)
7440 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7441extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock,
7442 const pthread_rwlockattr_t *__restrict
7443 __attr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7444extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock)
7445 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7446extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock)
7447 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
7448extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock)
7449 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
7450extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock,
7451 const struct timespec *__restrict
7452 __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
7453extern int pthread_rwlock_clockrdlock (pthread_rwlock_t *__restrict __rwlock,
7454 clockid_t __clockid,
7455 const struct timespec *__restrict
7456 __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3)));
7457extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock)
7458 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
7459extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock)
7460 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
7461extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock,
7462 const struct timespec *__restrict
7463 __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
7464extern int pthread_rwlock_clockwrlock (pthread_rwlock_t *__restrict __rwlock,
7465 clockid_t __clockid,
7466 const struct timespec *__restrict
7467 __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3)));
7468extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock)
7469 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
7470extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr)
7471 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7472extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr)
7473 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7474extern int pthread_rwlockattr_getpshared (const pthread_rwlockattr_t *
7475 __restrict __attr,
7476 int *__restrict __pshared)
7477 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
7478extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr,
7479 int __pshared)
7480 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7481extern int pthread_rwlockattr_getkind_np (const pthread_rwlockattr_t *
7482 __restrict __attr,
7483 int *__restrict __pref)
7484 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
7485extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr,
7486 int __pref) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7487extern int pthread_cond_init (pthread_cond_t *__restrict __cond,
7488 const pthread_condattr_t *__restrict __cond_attr)
7489 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7490extern int pthread_cond_destroy (pthread_cond_t *__cond)
7491 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7492extern int pthread_cond_signal (pthread_cond_t *__cond)
7493 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
7494extern int pthread_cond_broadcast (pthread_cond_t *__cond)
7495 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
7496extern int pthread_cond_wait (pthread_cond_t *__restrict __cond,
7497 pthread_mutex_t *__restrict __mutex)
7498 __attribute__ ((__nonnull__ (1, 2)));
7499extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond,
7500 pthread_mutex_t *__restrict __mutex,
7501 const struct timespec *__restrict __abstime)
7502 __attribute__ ((__nonnull__ (1, 2, 3)));
7503extern int pthread_cond_clockwait (pthread_cond_t *__restrict __cond,
7504 pthread_mutex_t *__restrict __mutex,
7505 __clockid_t __clock_id,
7506 const struct timespec *__restrict __abstime)
7507 __attribute__ ((__nonnull__ (1, 2, 4)));
7508extern int pthread_condattr_init (pthread_condattr_t *__attr)
7509 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7510extern int pthread_condattr_destroy (pthread_condattr_t *__attr)
7511 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7512extern int pthread_condattr_getpshared (const pthread_condattr_t *
7513 __restrict __attr,
7514 int *__restrict __pshared)
7515 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
7516extern int pthread_condattr_setpshared (pthread_condattr_t *__attr,
7517 int __pshared) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7518extern int pthread_condattr_getclock (const pthread_condattr_t *
7519 __restrict __attr,
7520 __clockid_t *__restrict __clock_id)
7521 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
7522extern int pthread_condattr_setclock (pthread_condattr_t *__attr,
7523 __clockid_t __clock_id)
7524 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7525extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared)
7526 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7527extern int pthread_spin_destroy (pthread_spinlock_t *__lock)
7528 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7529extern int pthread_spin_lock (pthread_spinlock_t *__lock)
7530 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
7531extern int pthread_spin_trylock (pthread_spinlock_t *__lock)
7532 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
7533extern int pthread_spin_unlock (pthread_spinlock_t *__lock)
7534 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
7535extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier,
7536 const pthread_barrierattr_t *__restrict
7537 __attr, unsigned int __count)
7538 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7539extern int pthread_barrier_destroy (pthread_barrier_t *__barrier)
7540 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7541extern int pthread_barrier_wait (pthread_barrier_t *__barrier)
7542 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
7543extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr)
7544 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7545extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr)
7546 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7547extern int pthread_barrierattr_getpshared (const pthread_barrierattr_t *
7548 __restrict __attr,
7549 int *__restrict __pshared)
7550 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
7551extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr,
7552 int __pshared)
7553 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7554extern int pthread_key_create (pthread_key_t *__key,
7555 void (*__destr_function) (void *))
7556 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7557extern int pthread_key_delete (pthread_key_t __key) __attribute__ ((__nothrow__ , __leaf__));
7558extern void *pthread_getspecific (pthread_key_t __key) __attribute__ ((__nothrow__ , __leaf__));
7559extern int pthread_setspecific (pthread_key_t __key,
7560 const void *__pointer) __attribute__ ((__nothrow__ , __leaf__)) ;
7561extern int pthread_getcpuclockid (pthread_t __thread_id,
7562 __clockid_t *__clock_id)
7563 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
7564extern int pthread_atfork (void (*__prepare) (void),
7565 void (*__parent) (void),
7566 void (*__child) (void)) __attribute__ ((__nothrow__ , __leaf__));
7567extern __inline __attribute__ ((__gnu_inline__)) int
7568__attribute__ ((__nothrow__ , __leaf__)) pthread_equal (pthread_t __thread1, pthread_t __thread2)
7569{
7570 return __thread1 == __thread2;
7571}
7572
7573typedef pthread_t rb_nativethread_id_t;
7575
7576
7577rb_nativethread_id_t rb_nativethread_self();
7582
7583
7586 union {
7587 struct list_node ubf;
7588 struct list_node gvl;
7589 } node;
7590 union
7591 {
7594 } cond;
7597 const struct rb_thread_struct *owner;
7599 struct list_head waitq;
7600 const struct rb_thread_struct *timer;
7601 int timer_err;
7602 rb_nativethread_cond_t switch_cond;
7603 rb_nativethread_cond_t switch_wait_cond;
7604 int need_yield;
7605 int wait_yield;
7607
7609 {
7610 __jmp_buf __jmpbuf;
7611 int __mask_was_saved;
7612 __sigset_t __saved_mask;
7613 };
7614typedef struct __jmp_buf_tag jmp_buf[1];
7615extern int setjmp (jmp_buf __env) __attribute__ ((__nothrow__));
7616extern int __sigsetjmp (struct __jmp_buf_tag __env[1], int __savemask) __attribute__ ((__nothrow__));
7617extern int _setjmp (struct __jmp_buf_tag __env[1]) __attribute__ ((__nothrow__));
7618extern void longjmp (struct __jmp_buf_tag __env[1], int __val)
7619 __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
7620extern void _longjmp (struct __jmp_buf_tag __env[1], int __val)
7621 __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
7622typedef struct __jmp_buf_tag sigjmp_buf[1];
7623extern void siglongjmp (sigjmp_buf __env, int __val)
7624 __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
7625extern void longjmp (struct __jmp_buf_tag __env[1], int __val) __asm__ ("" "__longjmp_chk") __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
7626extern void _longjmp (struct __jmp_buf_tag __env[1], int __val) __asm__ ("" "__longjmp_chk") __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
7627extern void siglongjmp (struct __jmp_buf_tag __env[1], int __val) __asm__ ("" "__longjmp_chk") __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
7628
7629
7630typedef __sig_atomic_t sig_atomic_t;
7632{
7633 int sival_int;
7634 void *sival_ptr;
7635};
7636typedef union sigval __sigval_t;
7637typedef struct
7638 {
7639 int si_signo;
7640 int si_errno;
7641 int si_code;
7642 int __pad0;
7643 union
7644 {
7645 int _pad[((128 / sizeof (int)) - 4)];
7646 struct
7647 {
7648 __pid_t si_pid;
7649 __uid_t si_uid;
7650 } _kill;
7651 struct
7652 {
7653 int si_tid;
7654 int si_overrun;
7655 __sigval_t si_sigval;
7656 } _timer;
7657 struct
7658 {
7659 __pid_t si_pid;
7660 __uid_t si_uid;
7661 __sigval_t si_sigval;
7662 } _rt;
7663 struct
7664 {
7665 __pid_t si_pid;
7666 __uid_t si_uid;
7667 int si_status;
7668 __clock_t si_utime;
7669 __clock_t si_stime;
7670 } _sigchld;
7671 struct
7672 {
7673 void *si_addr;
7674
7675 short int si_addr_lsb;
7676 union
7677 {
7678 struct
7679 {
7680 void *_lower;
7681 void *_upper;
7682 } _addr_bnd;
7683 __uint32_t _pkey;
7684 } _bounds;
7685 } _sigfault;
7686 struct
7687 {
7688 long int si_band;
7689 int si_fd;
7690 } _sigpoll;
7691 struct
7692 {
7693 void *_call_addr;
7694 int _syscall;
7695 unsigned int _arch;
7696 } _sigsys;
7697 } _sifields;
7698 } siginfo_t ;
7699enum
7700{
7701 SI_ASYNCNL = -60,
7702 SI_DETHREAD = -7,
7703 SI_TKILL,
7704 SI_SIGIO,
7705 SI_ASYNCIO,
7706 SI_MESGQ,
7707 SI_TIMER,
7708 SI_QUEUE,
7709 SI_USER,
7710 SI_KERNEL = 0x80
7711};
7712enum
7713{
7714 ILL_ILLOPC = 1,
7715 ILL_ILLOPN,
7716 ILL_ILLADR,
7717 ILL_ILLTRP,
7718 ILL_PRVOPC,
7719 ILL_PRVREG,
7720 ILL_COPROC,
7721 ILL_BADSTK,
7722 ILL_BADIADDR
7723};
7724enum
7725{
7726 FPE_INTDIV = 1,
7727 FPE_INTOVF,
7728 FPE_FLTDIV,
7729 FPE_FLTOVF,
7730 FPE_FLTUND,
7731 FPE_FLTRES,
7732 FPE_FLTINV,
7733 FPE_FLTSUB,
7734 FPE_FLTUNK = 14,
7735 FPE_CONDTRAP
7736};
7737enum
7738{
7739 SEGV_MAPERR = 1,
7740 SEGV_ACCERR,
7741 SEGV_BNDERR,
7742 SEGV_PKUERR,
7743 SEGV_ACCADI,
7744 SEGV_ADIDERR,
7745 SEGV_ADIPERR
7746};
7747enum
7748{
7749 BUS_ADRALN = 1,
7750 BUS_ADRERR,
7751 BUS_OBJERR,
7752 BUS_MCEERR_AR,
7753 BUS_MCEERR_AO
7754};
7755enum
7756{
7757 TRAP_BRKPT = 1,
7758 TRAP_TRACE,
7759 TRAP_BRANCH,
7760 TRAP_HWBKPT,
7761 TRAP_UNK
7762};
7763enum
7764{
7765 CLD_EXITED = 1,
7766 CLD_KILLED,
7767 CLD_DUMPED,
7768 CLD_TRAPPED,
7769 CLD_STOPPED,
7770 CLD_CONTINUED
7771};
7772enum
7773{
7774 POLL_IN = 1,
7775 POLL_OUT,
7776 POLL_MSG,
7777 POLL_ERR,
7778 POLL_PRI,
7779 POLL_HUP
7780};
7781typedef __sigval_t sigval_t;
7782typedef struct sigevent
7783 {
7784 __sigval_t sigev_value;
7785 int sigev_signo;
7786 int sigev_notify;
7787 union
7788 {
7789 int _pad[((64 / sizeof (int)) - 4)];
7790 __pid_t _tid;
7791 struct
7792 {
7793 void (*_function) (__sigval_t);
7794 pthread_attr_t *_attribute;
7795 } _sigev_thread;
7796 } _sigev_un;
7797 } sigevent_t;
7798enum
7799{
7800 SIGEV_SIGNAL = 0,
7801 SIGEV_NONE,
7802 SIGEV_THREAD,
7803 SIGEV_THREAD_ID = 4
7804};
7805typedef void (*__sighandler_t) (int);
7806extern __sighandler_t __sysv_signal (int __sig, __sighandler_t __handler)
7807 __attribute__ ((__nothrow__ , __leaf__));
7808extern __sighandler_t sysv_signal (int __sig, __sighandler_t __handler)
7809 __attribute__ ((__nothrow__ , __leaf__));
7810extern __sighandler_t signal (int __sig, __sighandler_t __handler)
7811 __attribute__ ((__nothrow__ , __leaf__));
7812extern int kill (__pid_t __pid, int __sig) __attribute__ ((__nothrow__ , __leaf__));
7813extern int killpg (__pid_t __pgrp, int __sig) __attribute__ ((__nothrow__ , __leaf__));
7814extern int raise (int __sig) __attribute__ ((__nothrow__ , __leaf__));
7815extern __sighandler_t ssignal (int __sig, __sighandler_t __handler)
7816 __attribute__ ((__nothrow__ , __leaf__));
7817extern int gsignal (int __sig) __attribute__ ((__nothrow__ , __leaf__));
7818extern void psignal (int __sig, const char *__s);
7819extern void psiginfo (const siginfo_t *__pinfo, const char *__s);
7820extern int sigpause (int __sig) __asm__ ("__xpg_sigpause")
7821 __attribute__ ((__deprecated__ ("Use the sigsuspend function instead")));
7822extern int sigblock (int __mask) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__));
7823extern int sigsetmask (int __mask) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__));
7824extern int siggetmask (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__));
7825typedef __sighandler_t sighandler_t;
7826typedef __sighandler_t sig_t;
7827extern int sigemptyset (sigset_t *__set) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7828extern int sigfillset (sigset_t *__set) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7829extern int sigaddset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7830extern int sigdelset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7831extern int sigismember (const sigset_t *__set, int __signo)
7832 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7833extern int sigisemptyset (const sigset_t *__set) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7834extern int sigandset (sigset_t *__set, const sigset_t *__left,
7835 const sigset_t *__right) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2, 3)));
7836extern int sigorset (sigset_t *__set, const sigset_t *__left,
7837 const sigset_t *__right) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2, 3)));
7839 {
7840 union
7841 {
7842 __sighandler_t sa_handler;
7843 void (*sa_sigaction) (int, siginfo_t *, void *);
7844 }
7845 __sigaction_handler;
7846 __sigset_t sa_mask;
7847 int sa_flags;
7848 void (*sa_restorer) (void);
7849 };
7850extern int sigprocmask (int __how, const sigset_t *__restrict __set,
7851 sigset_t *__restrict __oset) __attribute__ ((__nothrow__ , __leaf__));
7852extern int sigsuspend (const sigset_t *__set) __attribute__ ((__nonnull__ (1)));
7853extern int sigaction (int __sig, const struct sigaction *__restrict __act,
7854 struct sigaction *__restrict __oact) __attribute__ ((__nothrow__ , __leaf__));
7855extern int sigpending (sigset_t *__set) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7856extern int sigwait (const sigset_t *__restrict __set, int *__restrict __sig)
7857 __attribute__ ((__nonnull__ (1, 2)));
7858extern int sigwaitinfo (const sigset_t *__restrict __set,
7859 siginfo_t *__restrict __info) __attribute__ ((__nonnull__ (1)));
7860extern int sigtimedwait (const sigset_t *__restrict __set,
7861 siginfo_t *__restrict __info,
7862 const struct timespec *__restrict __timeout)
7863 __attribute__ ((__nonnull__ (1)));
7864extern int sigqueue (__pid_t __pid, int __sig, const union sigval __val)
7865 __attribute__ ((__nothrow__ , __leaf__));
7867{
7868 __uint32_t magic1;
7869 __uint32_t extended_size;
7870 __uint64_t xstate_bv;
7871 __uint32_t xstate_size;
7872 __uint32_t __glibc_reserved1[7];
7873};
7875{
7876 unsigned short significand[4];
7877 unsigned short exponent;
7878};
7880{
7881 unsigned short significand[4];
7882 unsigned short exponent;
7883 unsigned short __glibc_reserved1[3];
7884};
7886{
7887 __uint32_t element[4];
7888};
7890{
7891 __uint16_t cwd;
7892 __uint16_t swd;
7893 __uint16_t ftw;
7894 __uint16_t fop;
7895 __uint64_t rip;
7896 __uint64_t rdp;
7897 __uint32_t mxcsr;
7898 __uint32_t mxcr_mask;
7899 struct _fpxreg _st[8];
7900 struct _xmmreg _xmm[16];
7901 __uint32_t __glibc_reserved1[24];
7902};
7904{
7905 __uint64_t r8;
7906 __uint64_t r9;
7907 __uint64_t r10;
7908 __uint64_t r11;
7909 __uint64_t r12;
7910 __uint64_t r13;
7911 __uint64_t r14;
7912 __uint64_t r15;
7913 __uint64_t rdi;
7914 __uint64_t rsi;
7915 __uint64_t rbp;
7916 __uint64_t rbx;
7917 __uint64_t rdx;
7918 __uint64_t rax;
7919 __uint64_t rcx;
7920 __uint64_t rsp;
7921 __uint64_t rip;
7922 __uint64_t eflags;
7923 unsigned short cs;
7924 unsigned short gs;
7925 unsigned short fs;
7926 unsigned short __pad0;
7927 __uint64_t err;
7928 __uint64_t trapno;
7929 __uint64_t oldmask;
7930 __uint64_t cr2;
7931 __extension__ union
7932 {
7933 struct _fpstate * fpstate;
7934 __uint64_t __fpstate_word;
7935 };
7936 __uint64_t __reserved1 [8];
7937};
7939{
7940 __uint64_t xstate_bv;
7941 __uint64_t __glibc_reserved1[2];
7942 __uint64_t __glibc_reserved2[5];
7943};
7945{
7946 __uint32_t ymmh_space[64];
7947};
7949{
7950 struct _fpstate fpstate;
7951 struct _xsave_hdr xstate_hdr;
7952 struct _ymmh_state ymmh;
7953};
7954extern int sigreturn (struct sigcontext *__scp) __attribute__ ((__nothrow__ , __leaf__));
7955typedef struct
7956 {
7957 void *ss_sp;
7958 int ss_flags;
7959 size_t ss_size;
7960 } stack_t;
7961__extension__ typedef long long int greg_t;
7962typedef greg_t gregset_t[23];
7963enum
7964{
7965 REG_R8 = 0,
7966 REG_R9,
7967 REG_R10,
7968 REG_R11,
7969 REG_R12,
7970 REG_R13,
7971 REG_R14,
7972 REG_R15,
7973 REG_RDI,
7974 REG_RSI,
7975 REG_RBP,
7976 REG_RBX,
7977 REG_RDX,
7978 REG_RAX,
7979 REG_RCX,
7980 REG_RSP,
7981 REG_RIP,
7982 REG_EFL,
7983 REG_CSGSFS,
7984 REG_ERR,
7985 REG_TRAPNO,
7986 REG_OLDMASK,
7987 REG_CR2
7988};
7990{
7991 unsigned short int significand[4];
7992 unsigned short int exponent;
7993 unsigned short int __glibc_reserved1[3];
7994};
7996{
7997 __uint32_t element[4];
7998};
8000{
8001 __uint16_t cwd;
8002 __uint16_t swd;
8003 __uint16_t ftw;
8004 __uint16_t fop;
8005 __uint64_t rip;
8006 __uint64_t rdp;
8007 __uint32_t mxcsr;
8008 __uint32_t mxcr_mask;
8009 struct _libc_fpxreg _st[8];
8010 struct _libc_xmmreg _xmm[16];
8011 __uint32_t __glibc_reserved1[24];
8012};
8013typedef struct _libc_fpstate *fpregset_t;
8014typedef struct
8015 {
8016 gregset_t gregs;
8017 fpregset_t fpregs;
8018 __extension__ unsigned long long __reserved1 [8];
8019} mcontext_t;
8020typedef struct ucontext_t
8021 {
8022 unsigned long int uc_flags;
8023 struct ucontext_t *uc_link;
8024 stack_t uc_stack;
8025 mcontext_t uc_mcontext;
8026 sigset_t uc_sigmask;
8027 struct _libc_fpstate __fpregs_mem;
8028 __extension__ unsigned long long int __ssp[4];
8029 } ucontext_t;
8030extern int siginterrupt (int __sig, int __interrupt) __attribute__ ((__nothrow__ , __leaf__))
8031 __attribute__ ((__deprecated__ ("Use sigaction with SA_RESTART instead")));
8032enum
8033{
8034 SS_ONSTACK = 1,
8035 SS_DISABLE
8036};
8037extern int sigaltstack (const stack_t *__restrict __ss,
8038 stack_t *__restrict __oss) __attribute__ ((__nothrow__ , __leaf__));
8040 {
8041 void *ss_sp;
8042 int ss_onstack;
8043 };
8044extern int sigstack (struct sigstack *__ss, struct sigstack *__oss)
8045 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__));
8046extern int sighold (int __sig) __attribute__ ((__nothrow__ , __leaf__))
8047 __attribute__ ((__deprecated__ ("Use the sigprocmask function instead")));
8048extern int sigrelse (int __sig) __attribute__ ((__nothrow__ , __leaf__))
8049 __attribute__ ((__deprecated__ ("Use the sigprocmask function instead")));
8050extern int sigignore (int __sig) __attribute__ ((__nothrow__ , __leaf__))
8051 __attribute__ ((__deprecated__ ("Use the signal function instead")));
8052extern __sighandler_t sigset (int __sig, __sighandler_t __disp) __attribute__ ((__nothrow__ , __leaf__))
8053 __attribute__ ((__deprecated__ ("Use the signal and sigprocmask functions instead")));
8054extern int pthread_sigmask (int __how,
8055 const __sigset_t *__restrict __newmask,
8056 __sigset_t *__restrict __oldmask)__attribute__ ((__nothrow__ , __leaf__));
8057extern int pthread_kill (pthread_t __threadid, int __signo) __attribute__ ((__nothrow__ , __leaf__));
8058extern int pthread_sigqueue (pthread_t __threadid, int __signo,
8059 const union sigval __value) __attribute__ ((__nothrow__ , __leaf__));
8060extern int __libc_current_sigrtmin (void) __attribute__ ((__nothrow__ , __leaf__));
8061extern int __libc_current_sigrtmax (void) __attribute__ ((__nothrow__ , __leaf__));
8062extern int tgkill (__pid_t __tgid, __pid_t __tid, int __signal);
8063
8064void *rb_register_sigaltstack(void);
8065void rb_vm_encoded_insn_data_table_init(void);
8066typedef unsigned long rb_num_t;
8067typedef signed long rb_snum_t;
8068enum ruby_tag_type {
8069 RUBY_TAG_NONE = 0x0,
8070 RUBY_TAG_RETURN = 0x1,
8071 RUBY_TAG_BREAK = 0x2,
8072 RUBY_TAG_NEXT = 0x3,
8073 RUBY_TAG_RETRY = 0x4,
8074 RUBY_TAG_REDO = 0x5,
8075 RUBY_TAG_RAISE = 0x6,
8076 RUBY_TAG_THROW = 0x7,
8077 RUBY_TAG_FATAL = 0x8,
8078 RUBY_TAG_MASK = 0xf
8079};
8080enum ruby_vm_throw_flags {
8081 VM_THROW_NO_ESCAPE_FLAG = 0x8000,
8082 VM_THROW_STATE_MASK = 0xff
8083};
8084struct rb_thread_struct;
8088 rb_serial_t ic_serial;
8089 const rb_cref_t *ic_cref;
8090 union {
8091 size_t index;
8092 VALUE value;
8093 } ic_value;
8094};
8096 struct {
8097 struct rb_thread_struct *running_thread;
8098 VALUE value;
8099 } once;
8100 struct iseq_inline_cache_entry cache;
8101};
8102enum method_missing_reason {
8103 MISSING_NOENTRY = 0x00,
8104 MISSING_PRIVATE = 0x01,
8105 MISSING_PROTECTED = 0x02,
8106 MISSING_FCALL = 0x04,
8107 MISSING_VCALL = 0x08,
8108 MISSING_SUPER = 0x10,
8109 MISSING_MISSING = 0x20,
8110 MISSING_NONE = 0x40
8111};
8113 ID mid;
8114 unsigned int flag;
8115 int orig_argc;
8116};
8118 int keyword_len;
8119 VALUE keywords[1];
8120};
8122 struct rb_call_info ci;
8123 struct rb_call_info_kw_arg *kw_arg;
8124};
8126 VALUE block_handler;
8127 VALUE recv;
8128 int argc;
8129};
8130struct rb_call_cache;
8132typedef VALUE (*vm_call_handler)(struct rb_execution_context_struct *ec, struct rb_control_frame_struct *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc);
8134 rb_serial_t method_state;
8135 rb_serial_t class_serial;
8137 vm_call_handler call;
8138 union {
8139 unsigned int index;
8140 enum method_missing_reason method_missing_reason;
8141 int inc_sp;
8142 } aux;
8143};
8145 VALUE pathobj;
8146 VALUE base_label;
8147 VALUE label;
8148 VALUE first_lineno;
8149 int node_id;
8150 rb_code_location_t code_location;
8152static inline VALUE
8153pathobj_path(VALUE pathobj)
8154{
8155 if (( ((RUBY_T_STRING) == RUBY_T_FIXNUM) ? (((int)(long)(pathobj))&RUBY_FIXNUM_FLAG) : ((RUBY_T_STRING) == RUBY_T_TRUE) ? ((pathobj) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_STRING) == RUBY_T_FALSE) ? ((pathobj) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_STRING) == RUBY_T_NIL) ? ((pathobj) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_STRING) == RUBY_T_UNDEF) ? ((pathobj) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_STRING) == RUBY_T_SYMBOL) ? ((((VALUE)(pathobj)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(pathobj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(pathobj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(pathobj))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_STRING) == RUBY_T_FLOAT) ? ( ((((int)(long)(pathobj))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(pathobj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(pathobj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(pathobj))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(pathobj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(pathobj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(pathobj))->flags & RUBY_T_MASK) == (RUBY_T_STRING)))) {
8156 return pathobj;
8157 }
8158 else {
8159 ((void)0);
8160 return (rb_array_const_ptr_transient(pathobj)[0]);
8161 }
8162}
8163static inline VALUE
8164pathobj_realpath(VALUE pathobj)
8165{
8166 if (( ((RUBY_T_STRING) == RUBY_T_FIXNUM) ? (((int)(long)(pathobj))&RUBY_FIXNUM_FLAG) : ((RUBY_T_STRING) == RUBY_T_TRUE) ? ((pathobj) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_STRING) == RUBY_T_FALSE) ? ((pathobj) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_STRING) == RUBY_T_NIL) ? ((pathobj) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_STRING) == RUBY_T_UNDEF) ? ((pathobj) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_STRING) == RUBY_T_SYMBOL) ? ((((VALUE)(pathobj)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(pathobj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(pathobj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(pathobj))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_STRING) == RUBY_T_FLOAT) ? ( ((((int)(long)(pathobj))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(pathobj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(pathobj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(pathobj))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(pathobj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(pathobj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(pathobj))->flags & RUBY_T_MASK) == (RUBY_T_STRING)))) {
8167 return pathobj;
8168 }
8169 else {
8170 ((void)0);
8171 return (rb_array_const_ptr_transient(pathobj)[1]);
8172 }
8173}
8174struct rb_mjit_unit;
8176 enum iseq_type {
8177 ISEQ_TYPE_TOP,
8178 ISEQ_TYPE_METHOD,
8179 ISEQ_TYPE_BLOCK,
8180 ISEQ_TYPE_CLASS,
8181 ISEQ_TYPE_RESCUE,
8182 ISEQ_TYPE_ENSURE,
8183 ISEQ_TYPE_EVAL,
8184 ISEQ_TYPE_MAIN,
8185 ISEQ_TYPE_PLAIN
8186 } type;
8187 unsigned int iseq_size;
8188 const VALUE *iseq_encoded;
8189 struct {
8190 struct {
8191 unsigned int has_lead : 1;
8192 unsigned int has_opt : 1;
8193 unsigned int has_rest : 1;
8194 unsigned int has_post : 1;
8195 unsigned int has_kw : 1;
8196 unsigned int has_kwrest : 1;
8197 unsigned int has_block : 1;
8198 unsigned int ambiguous_param0 : 1;
8199 } flags;
8200 unsigned int size;
8201 int lead_num;
8202 int opt_num;
8203 int rest_start;
8204 int post_start;
8205 int post_num;
8206 int block_start;
8207 const VALUE *opt_table;
8208 const struct rb_iseq_param_keyword {
8209 int num;
8210 int required_num;
8211 int bits_start;
8212 int rest_start;
8213 const ID *table;
8214 const VALUE *default_values;
8215 } *keyword;
8216 } param;
8217 rb_iseq_location_t location;
8219 const struct iseq_insn_info_entry *body;
8220 unsigned int *positions;
8221 unsigned int size;
8223 } insns_info;
8224 const ID *local_table;
8225 const struct iseq_catch_table *catch_table;
8226 const struct rb_iseq_struct *parent_iseq;
8227 struct rb_iseq_struct *local_iseq;
8228 union iseq_inline_storage_entry *is_entries;
8229 struct rb_call_info *ci_entries;
8230 struct rb_call_cache *cc_entries;
8231 struct {
8232 rb_snum_t flip_count;
8233 VALUE coverage;
8234 VALUE pc2branchindex;
8235 VALUE *original_iseq;
8236 } variable;
8237 unsigned int local_table_size;
8238 unsigned int is_size;
8239 unsigned int ci_size;
8240 unsigned int ci_kw_size;
8241 unsigned int stack_max;
8242 VALUE (*jit_func)(struct rb_execution_context_struct *,
8243 struct rb_control_frame_struct *);
8244 long unsigned total_calls;
8245 struct rb_mjit_unit *jit_unit;
8246 char catch_except_p;
8247};
8249 VALUE flags;
8250 VALUE wrapper;
8251 struct rb_iseq_constant_body *body;
8252 union {
8253 struct iseq_compile_data *compile_data;
8254 struct {
8255 VALUE obj;
8256 int index;
8257 } loader;
8258 struct {
8259 struct rb_hook_list_struct *local_hooks;
8260 rb_event_flag_t global_trace_events;
8261 } exec;
8262 } aux;
8263};
8264static inline const rb_iseq_t *
8265rb_iseq_check(const rb_iseq_t *iseq)
8266{
8267 return iseq;
8268}
8269static inline const rb_iseq_t *
8270def_iseq_ptr(rb_method_definition_t *def)
8271{
8272 return rb_iseq_check(def->body.iseq.iseqptr);
8273}
8274enum ruby_special_exceptions {
8275 ruby_error_reenter,
8276 ruby_error_nomemory,
8277 ruby_error_sysstack,
8278 ruby_error_stackfatal,
8279 ruby_error_stream_closed,
8280 ruby_special_error_count
8281};
8282enum ruby_basic_operators {
8283 BOP_PLUS,
8284 BOP_MINUS,
8285 BOP_MULT,
8286 BOP_DIV,
8287 BOP_MOD,
8288 BOP_EQ,
8289 BOP_EQQ,
8290 BOP_LT,
8291 BOP_LE,
8292 BOP_LTLT,
8293 BOP_AREF,
8294 BOP_ASET,
8295 BOP_LENGTH,
8296 BOP_SIZE,
8297 BOP_EMPTY_P,
8298 BOP_SUCC,
8299 BOP_GT,
8300 BOP_GE,
8301 BOP_NOT,
8302 BOP_NEQ,
8303 BOP_MATCH,
8304 BOP_FREEZE,
8305 BOP_UMINUS,
8306 BOP_MAX,
8307 BOP_MIN,
8308 BOP_CALL,
8309 BOP_AND,
8310 BOP_OR,
8311 BOP_LAST_
8312};
8313struct rb_vm_struct;
8314typedef void rb_vm_at_exit_func(struct rb_vm_struct*);
8315typedef struct rb_at_exit_list {
8316 rb_vm_at_exit_func *func;
8317 struct rb_at_exit_list *next;
8319struct rb_objspace;
8320struct rb_objspace *rb_objspace_alloc(void);
8321void rb_objspace_free(struct rb_objspace *);
8322typedef struct rb_hook_list_struct {
8323 struct rb_event_hook_struct *hooks;
8324 rb_event_flag_t events;
8325 unsigned int need_clean;
8326 unsigned int running;
8328typedef struct rb_vm_struct {
8329 VALUE self;
8331 struct rb_thread_struct *main_thread;
8332 const struct rb_thread_struct *running_thread;
8333 void *main_altstack;
8334 rb_serial_t fork_gen;
8335 rb_nativethread_lock_t waitpid_lock;
8336 struct list_head waiting_pids;
8337 struct list_head waiting_grps;
8338 struct list_head waiting_fds;
8339 struct list_head living_threads;
8340 VALUE thgroup_default;
8341 int living_thread_num;
8342 unsigned int running: 1;
8343 unsigned int thread_abort_on_exception: 1;
8344 unsigned int thread_report_on_exception: 1;
8345 unsigned int safe_level_: 1;
8346 int sleeper;
8347 VALUE mark_object_ary;
8348 const VALUE special_exceptions[ruby_special_error_count];
8349 VALUE top_self;
8350 VALUE load_path;
8351 VALUE load_path_snapshot;
8352 VALUE load_path_check_cache;
8353 VALUE expanded_load_path;
8354 VALUE loaded_features;
8355 VALUE loaded_features_snapshot;
8356 struct st_table *loaded_features_index;
8357 struct st_table *loading_table;
8358 struct {
8359 VALUE cmd[(64 + 1)];
8360 unsigned char safe[(64 + 1)];
8361 } trap_list;
8362 rb_hook_list_t global_hooks;
8363 struct st_table *ensure_rollback_table;
8364 struct rb_postponed_job_struct *postponed_job_buffer;
8365 int postponed_job_index;
8366 int src_encoding_index;
8367 struct list_head workqueue;
8368 rb_nativethread_lock_t workqueue_lock;
8369 VALUE verbose, debug, orig_progname, progname;
8370 VALUE coverages;
8371 int coverage_mode;
8372 VALUE defined_module_hash;
8373 struct rb_objspace *objspace;
8374 rb_at_exit_list *at_exit;
8375 VALUE *defined_strings;
8376 st_table *frozen_strings;
8377 struct {
8378 size_t thread_vm_stack_size;
8379 size_t thread_machine_stack_size;
8380 size_t fiber_vm_stack_size;
8381 size_t fiber_machine_stack_size;
8382 } default_params;
8383 short redefined_flag[BOP_LAST_];
8384} rb_vm_t;
8386 VALUE self;
8387 const VALUE *ep;
8388 union {
8389 const rb_iseq_t *iseq;
8390 const struct vm_ifunc *ifunc;
8391 VALUE val;
8392 } code;
8393};
8394enum rb_block_handler_type {
8395 block_handler_type_iseq,
8396 block_handler_type_ifunc,
8397 block_handler_type_symbol,
8398 block_handler_type_proc
8399};
8400enum rb_block_type {
8401 block_type_iseq,
8402 block_type_ifunc,
8403 block_type_symbol,
8404 block_type_proc
8405};
8406struct rb_block {
8407 union {
8408 struct rb_captured_block captured;
8409 VALUE symbol;
8410 VALUE proc;
8411 } as;
8412 enum rb_block_type type;
8413};
8415 const VALUE *pc;
8416 VALUE *sp;
8417 const rb_iseq_t *iseq;
8418 VALUE self;
8419 const VALUE *ep;
8420 const void *block_code;
8421 const VALUE *bp;
8423extern const rb_data_type_t ruby_threadptr_data_type;
8424static inline struct rb_thread_struct *
8425rb_thread_ptr(VALUE thval)
8426{
8427 return (struct rb_thread_struct *)rb_check_typeddata(thval, &ruby_threadptr_data_type);
8428}
8429enum rb_thread_status {
8430 THREAD_RUNNABLE,
8431 THREAD_STOPPED,
8432 THREAD_STOPPED_FOREVER,
8433 THREAD_KILLED
8434};
8435typedef jmp_buf rb_jmpbuf_t;
8437 VALUE tag;
8438 VALUE retval;
8439 rb_jmpbuf_t buf;
8440 struct rb_vm_tag *prev;
8441 enum ruby_tag_type state;
8442};
8443__extension__ _Static_assert(__builtin_offsetof (struct rb_vm_tag, buf) > 0, "rb_vm_tag_buf_offset" ": " "offsetof(struct rb_vm_tag, buf) > 0");
8444__extension__ _Static_assert(__builtin_offsetof (struct rb_vm_tag, buf) + sizeof(rb_jmpbuf_t) < sizeof(struct rb_vm_tag), "rb_vm_tag_buf_end" ": " "offsetof(struct rb_vm_tag, buf) + sizeof(rb_jmpbuf_t) < sizeof(struct rb_vm_tag)");
8446 struct rb_vm_protect_tag *prev;
8447};
8450 void *arg;
8451};
8452struct rb_mutex_struct;
8454 struct rb_thread_list_struct *next;
8455 struct rb_thread_struct *th;
8457typedef struct rb_ensure_entry {
8458 VALUE marker;
8459 VALUE (*e_proc)();
8460 VALUE data2;
8462typedef struct rb_ensure_list {
8463 struct rb_ensure_list *next;
8464 struct rb_ensure_entry entry;
8466typedef char rb_thread_id_string_t[sizeof(rb_nativethread_id_t) * 2 + 3];
8467typedef struct rb_fiber_struct rb_fiber_t;
8469 VALUE *vm_stack;
8470 size_t vm_stack_size;
8471 rb_control_frame_t *cfp;
8472 struct rb_vm_tag *tag;
8473 struct rb_vm_protect_tag *protect_tag;
8474 rb_atomic_t interrupt_flag;
8475 rb_atomic_t interrupt_mask;
8476 rb_fiber_t *fiber_ptr;
8477 struct rb_thread_struct *thread_ptr;
8478 st_table *local_storage;
8479 VALUE local_storage_recursive_hash;
8480 VALUE local_storage_recursive_hash_for_trace;
8481 const VALUE *root_lep;
8482 VALUE root_svar;
8483 rb_ensure_list_t *ensure_list;
8484 struct rb_trace_arg_struct *trace_arg;
8485 VALUE errinfo;
8486 VALUE passed_block_handler;
8487 uint8_t raised_flag;
8488 enum method_missing_reason method_missing_reason : 8;
8489 VALUE private_const_reference;
8490 struct {
8491 VALUE *stack_start;
8492 VALUE *stack_end;
8493 size_t stack_maxsize;
8494 __attribute__((__aligned__(8))) jmp_buf regs;
8495 } machine;
8497void rb_ec_set_vm_stack(rb_execution_context_t *ec, VALUE *stack, size_t size);
8498typedef struct rb_thread_struct {
8499 struct list_node vmlt_node;
8500 VALUE self;
8501 rb_vm_t *vm;
8503 VALUE last_status;
8504 struct rb_calling_info *calling;
8505 VALUE top_self;
8506 VALUE top_wrapper;
8507 rb_nativethread_id_t thread_id;
8508 enum rb_thread_status status : 2;
8509 unsigned int to_kill : 1;
8510 unsigned int abort_on_exception: 1;
8511 unsigned int report_on_exception: 1;
8512 unsigned int pending_interrupt_queue_checked: 1;
8513 int8_t priority;
8514 uint32_t running_time_us;
8515 native_thread_data_t native_thread_data;
8516 void *blocking_region_buffer;
8517 VALUE thgroup;
8518 VALUE value;
8519 VALUE pending_interrupt_queue;
8520 VALUE pending_interrupt_mask_stack;
8521 rb_nativethread_lock_t interrupt_lock;
8522 struct rb_unblock_callback unblock;
8523 VALUE locking_mutex;
8524 struct rb_mutex_struct *keeping_mutexes;
8525 rb_thread_list_t *join_list;
8526 union {
8527 struct {
8528 VALUE proc;
8529 VALUE args;
8530 } proc;
8531 struct {
8532 VALUE (*func)();
8533 void *arg;
8534 } func;
8535 } invoke_arg;
8536 enum {
8537 thread_invoke_type_none = 0,
8538 thread_invoke_type_proc,
8539 thread_invoke_type_func
8540 } invoke_type;
8541 VALUE stat_insn_usage;
8542 rb_fiber_t *root_fiber;
8543 rb_jmpbuf_t root_jmpbuf;
8544 VALUE name;
8545} rb_thread_t;
8546typedef enum {
8547 VM_DEFINECLASS_TYPE_CLASS = 0x00,
8548 VM_DEFINECLASS_TYPE_SINGLETON_CLASS = 0x01,
8549 VM_DEFINECLASS_TYPE_MODULE = 0x02,
8550 VM_DEFINECLASS_TYPE_MASK = 0x07
8551} rb_vm_defineclass_type_t;
8552
8553
8554rb_iseq_t *rb_iseq_new (const rb_ast_body_t *ast, VALUE name, VALUE path, VALUE realpath, const rb_iseq_t *parent, enum iseq_type);
8555rb_iseq_t *rb_iseq_new_top (const rb_ast_body_t *ast, VALUE name, VALUE path, VALUE realpath, const rb_iseq_t *parent);
8556rb_iseq_t *rb_iseq_new_main (const rb_ast_body_t *ast, VALUE path, VALUE realpath, const rb_iseq_t *parent);
8557rb_iseq_t *rb_iseq_new_with_opt(const rb_ast_body_t *ast, VALUE name, VALUE path, VALUE realpath, VALUE first_lineno,
8558 const rb_iseq_t *parent, enum iseq_type, const rb_compile_option_t*);
8559rb_iseq_t *rb_iseq_new_ifunc(const struct vm_ifunc *ifunc, VALUE name, VALUE path, VALUE realpath, VALUE first_lineno,
8560 const rb_iseq_t *parent, enum iseq_type, const rb_compile_option_t*);
8561rb_iseq_t *rb_iseq_compile(VALUE src, VALUE file, VALUE line);
8562rb_iseq_t *rb_iseq_compile_on_base(VALUE src, VALUE file, VALUE line, const struct rb_block *base_block);
8563rb_iseq_t *rb_iseq_compile_with_option(VALUE src, VALUE file, VALUE realpath, VALUE line, const struct rb_block *base_block, VALUE opt);
8564VALUE rb_iseq_disasm(const rb_iseq_t *iseq);
8565int rb_iseq_disasm_insn(VALUE str, const VALUE *iseqval, size_t pos, const rb_iseq_t *iseq, VALUE child);
8566const char *ruby_node_name(int node);
8567VALUE rb_iseq_coverage(const rb_iseq_t *iseq);
8568extern VALUE rb_cISeq;
8569extern VALUE rb_cRubyVM;
8570extern VALUE rb_mRubyVMFrozenCore;
8571
8572
8573typedef struct {
8574 const struct rb_block block;
8575 unsigned int is_from_method: 1;
8576 unsigned int is_lambda: 1;
8577} rb_proc_t;
8578typedef struct {
8579 VALUE flags;
8580 const rb_iseq_t *iseq;
8581 const VALUE *ep;
8582 const VALUE *env;
8583 unsigned int env_size;
8584} rb_env_t;
8585extern const rb_data_type_t ruby_binding_data_type;
8586typedef struct {
8587 const struct rb_block block;
8588 const VALUE pathobj;
8589 unsigned short first_lineno;
8590} rb_binding_t;
8591enum vm_check_match_type {
8592 VM_CHECKMATCH_TYPE_WHEN = 1,
8593 VM_CHECKMATCH_TYPE_CASE = 2,
8594 VM_CHECKMATCH_TYPE_RESCUE = 3
8595};
8596enum vm_call_flag_bits {
8597 VM_CALL_ARGS_SPLAT_bit,
8598 VM_CALL_ARGS_BLOCKARG_bit,
8599 VM_CALL_FCALL_bit,
8600 VM_CALL_VCALL_bit,
8601 VM_CALL_ARGS_SIMPLE_bit,
8602 VM_CALL_BLOCKISEQ_bit,
8603 VM_CALL_KWARG_bit,
8604 VM_CALL_KW_SPLAT_bit,
8605 VM_CALL_TAILCALL_bit,
8606 VM_CALL_SUPER_bit,
8607 VM_CALL_ZSUPER_bit,
8608 VM_CALL_OPT_SEND_bit,
8609 VM_CALL__END
8610};
8611enum vm_special_object_type {
8612 VM_SPECIAL_OBJECT_VMCORE = 1,
8613 VM_SPECIAL_OBJECT_CBASE,
8614 VM_SPECIAL_OBJECT_CONST_BASE
8615};
8616enum vm_svar_index {
8617 VM_SVAR_LASTLINE = 0,
8618 VM_SVAR_BACKREF = 1,
8619 VM_SVAR_EXTRA_START = 2,
8620 VM_SVAR_FLIPFLOP_START = 2
8621};
8622typedef struct iseq_inline_cache_entry *IC;
8623typedef union iseq_inline_storage_entry *ISE;
8624typedef struct rb_call_info *CALL_INFO;
8625typedef struct rb_call_cache *CALL_CACHE;
8626void rb_vm_change_state(void);
8627typedef VALUE CDHASH;
8628typedef rb_control_frame_t *
8629 (*rb_insn_func_t)(rb_execution_context_t *, rb_control_frame_t *);
8630enum {
8631 VM_FRAME_MAGIC_METHOD = 0x11110001,
8632 VM_FRAME_MAGIC_BLOCK = 0x22220001,
8633 VM_FRAME_MAGIC_CLASS = 0x33330001,
8634 VM_FRAME_MAGIC_TOP = 0x44440001,
8635 VM_FRAME_MAGIC_CFUNC = 0x55550001,
8636 VM_FRAME_MAGIC_IFUNC = 0x66660001,
8637 VM_FRAME_MAGIC_EVAL = 0x77770001,
8638 VM_FRAME_MAGIC_RESCUE = 0x78880001,
8639 VM_FRAME_MAGIC_DUMMY = 0x79990001,
8640 VM_FRAME_MAGIC_MASK = 0x7fff0001,
8641 VM_FRAME_FLAG_PASSED = 0x0010,
8642 VM_FRAME_FLAG_FINISH = 0x0020,
8643 VM_FRAME_FLAG_BMETHOD = 0x0040,
8644 VM_FRAME_FLAG_CFRAME = 0x0080,
8645 VM_FRAME_FLAG_LAMBDA = 0x0100,
8646 VM_FRAME_FLAG_MODIFIED_BLOCK_PARAM = 0x0200,
8647 VM_ENV_FLAG_LOCAL = 0x0002,
8648 VM_ENV_FLAG_ESCAPED = 0x0004,
8649 VM_ENV_FLAG_WB_REQUIRED = 0x0008
8650};
8651static inline void VM_FORCE_WRITE_SPECIAL_CONST(const VALUE *ptr, VALUE special_const_value);
8652static inline void
8653VM_ENV_FLAGS_SET(const VALUE *ep, VALUE flag)
8654{
8655 VALUE flags = ep[( 0)];
8656 ((void)0);
8657 VM_FORCE_WRITE_SPECIAL_CONST(&ep[( 0)], flags | flag);
8658}
8659static inline void
8660VM_ENV_FLAGS_UNSET(const VALUE *ep, VALUE flag)
8661{
8662 VALUE flags = ep[( 0)];
8663 ((void)0);
8664 VM_FORCE_WRITE_SPECIAL_CONST(&ep[( 0)], flags & ~flag);
8665}
8666static inline unsigned long
8667VM_ENV_FLAGS(const VALUE *ep, long flag)
8668{
8669 VALUE flags = ep[( 0)];
8670 ((void)0);
8671 return flags & flag;
8672}
8673static inline unsigned long
8674VM_FRAME_TYPE(const rb_control_frame_t *cfp)
8675{
8676 return VM_ENV_FLAGS(cfp->ep, VM_FRAME_MAGIC_MASK);
8677}
8678static inline int
8679VM_FRAME_LAMBDA_P(const rb_control_frame_t *cfp)
8680{
8681 return VM_ENV_FLAGS(cfp->ep, VM_FRAME_FLAG_LAMBDA) != 0;
8682}
8683static inline int
8684VM_FRAME_FINISHED_P(const rb_control_frame_t *cfp)
8685{
8686 return VM_ENV_FLAGS(cfp->ep, VM_FRAME_FLAG_FINISH) != 0;
8687}
8688static inline int
8689VM_FRAME_BMETHOD_P(const rb_control_frame_t *cfp)
8690{
8691 return VM_ENV_FLAGS(cfp->ep, VM_FRAME_FLAG_BMETHOD) != 0;
8692}
8693static inline int
8694rb_obj_is_iseq(VALUE iseq)
8695{
8696 return imemo_type_p(iseq, imemo_iseq);
8697}
8698static inline int
8699VM_FRAME_CFRAME_P(const rb_control_frame_t *cfp)
8700{
8701 int cframe_p = VM_ENV_FLAGS(cfp->ep, VM_FRAME_FLAG_CFRAME) != 0;
8702 ((void)0);
8703 return cframe_p;
8704}
8705static inline int
8706VM_FRAME_RUBYFRAME_P(const rb_control_frame_t *cfp)
8707{
8708 return !VM_FRAME_CFRAME_P(cfp);
8709}
8710static inline int
8711VM_ENV_LOCAL_P(const VALUE *ep)
8712{
8713 return VM_ENV_FLAGS(ep, VM_ENV_FLAG_LOCAL) ? 1 : 0;
8714}
8715static inline const VALUE *
8716VM_ENV_PREV_EP(const VALUE *ep)
8717{
8718 ((void)0);
8719 return ((void *)(((ep[(-1)])) & ~0x03));
8720}
8721static inline VALUE
8722VM_ENV_BLOCK_HANDLER(const VALUE *ep)
8723{
8724 ((void)0);
8725 return ep[(-1)];
8726}
8727static inline int
8728VM_ENV_ESCAPED_P(const VALUE *ep)
8729{
8730 ((void)0);
8731 return VM_ENV_FLAGS(ep, VM_ENV_FLAG_ESCAPED) ? 1 : 0;
8732}
8733static inline VALUE
8734VM_ENV_ENVVAL(const VALUE *ep)
8735{
8736 VALUE envval = ep[( 1)];
8737 ((void)0);
8738 ((void)0);
8739 return envval;
8740}
8741static inline const rb_env_t *
8742VM_ENV_ENVVAL_PTR(const VALUE *ep)
8743{
8744 return (const rb_env_t *)VM_ENV_ENVVAL(ep);
8745}
8746static inline const rb_env_t *
8747vm_env_new(VALUE *env_ep, VALUE *env_body, unsigned int env_size, const rb_iseq_t *iseq)
8748{
8749 rb_env_t *env = (rb_env_t *)rb_imemo_new(imemo_env, (VALUE)env_ep, (VALUE)env_body, 0, (VALUE)iseq);
8750 env->env_size = env_size;
8751 env_ep[( 1)] = (VALUE)env;
8752 return env;
8753}
8754static inline void
8755VM_FORCE_WRITE(const VALUE *ptr, VALUE v)
8756{
8757 *((VALUE *)ptr) = v;
8758}
8759static inline void
8760VM_FORCE_WRITE_SPECIAL_CONST(const VALUE *ptr, VALUE special_const_value)
8761{
8762 ((void)0);
8763 VM_FORCE_WRITE(ptr, special_const_value);
8764}
8765static inline void
8766VM_STACK_ENV_WRITE(const VALUE *ep, int index, VALUE v)
8767{
8768 ((void)0);
8769 VM_FORCE_WRITE(&ep[index], v);
8770}static inline
8771const VALUE *rb_vm_ep_local_ep(const VALUE *ep);
8772const VALUE *rb_vm_proc_local_ep(VALUE proc);static inline
8773void rb_vm_block_ep_update(VALUE obj, const struct rb_block *dst, const VALUE *ep);
8774void rb_vm_block_copy(VALUE obj, const struct rb_block *dst, const struct rb_block *src);static inline
8775VALUE rb_vm_frame_block_handler(const rb_control_frame_t *cfp);
8776static inline const rb_control_frame_t *
8777RUBY_VM_END_CONTROL_FRAME(const rb_execution_context_t *ec)
8778{
8779 return (rb_control_frame_t *)(ec->vm_stack + ec->vm_stack_size);
8780}
8781static inline int
8782RUBY_VM_CONTROL_FRAME_STACK_OVERFLOW_P(const rb_execution_context_t *ec, const rb_control_frame_t *cfp)
8783{
8784 return !((void *)(RUBY_VM_END_CONTROL_FRAME(ec)) > (void *)(cfp));
8785}
8786static inline int
8787VM_BH_ISEQ_BLOCK_P(VALUE block_handler)
8788{
8789 if ((block_handler & 0x03) == 0x01) {
8790 return 1;
8791 }
8792 else {
8793 return 0;
8794 }
8795}
8796static inline VALUE
8797VM_BH_FROM_ISEQ_BLOCK(const struct rb_captured_block *captured)
8798{
8799 VALUE block_handler = ((VALUE)(captured) | (0x01));
8800 ((void)0);
8801 return block_handler;
8802}
8803static inline const struct rb_captured_block *
8804VM_BH_TO_ISEQ_BLOCK(VALUE block_handler)
8805{
8806 struct rb_captured_block *captured = ((void *)((block_handler) & ~0x03));
8807 ((void)0);
8808 return captured;
8809}
8810static inline int
8811VM_BH_IFUNC_P(VALUE block_handler)
8812{
8813 if ((block_handler & 0x03) == 0x03) {
8814 return 1;
8815 }
8816 else {
8817 return 0;
8818 }
8819}
8820static inline VALUE
8821VM_BH_FROM_IFUNC_BLOCK(const struct rb_captured_block *captured)
8822{
8823 VALUE block_handler = ((VALUE)(captured) | (0x03));
8824 ((void)0);
8825 return block_handler;
8826}
8827static inline const struct rb_captured_block *
8828VM_BH_TO_IFUNC_BLOCK(VALUE block_handler)
8829{
8830 struct rb_captured_block *captured = ((void *)((block_handler) & ~0x03));
8831 ((void)0);
8832 return captured;
8833}
8834static inline const struct rb_captured_block *
8835VM_BH_TO_CAPT_BLOCK(VALUE block_handler)
8836{
8837 struct rb_captured_block *captured = ((void *)((block_handler) & ~0x03));
8838 ((void)0);
8839 return captured;
8840}
8841static inline enum rb_block_handler_type
8842vm_block_handler_type(VALUE block_handler)
8843{
8844 if (VM_BH_ISEQ_BLOCK_P(block_handler)) {
8845 return block_handler_type_iseq;
8846 }
8847 else if (VM_BH_IFUNC_P(block_handler)) {
8848 return block_handler_type_ifunc;
8849 }
8850 else if (((((VALUE)(block_handler)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(block_handler) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(block_handler) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(block_handler))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL)))) {
8851 return block_handler_type_symbol;
8852 }
8853 else {
8854 ((void)0);
8855 return block_handler_type_proc;
8856 }
8857}
8858static inline void
8859vm_block_handler_verify(__attribute__ ((__unused__)) VALUE block_handler)
8860{
8861 ((void)0);
8862}
8863static inline enum rb_block_type
8864vm_block_type(const struct rb_block *block)
8865{
8866 return block->type;
8867}
8868static inline void
8869vm_block_type_set(const struct rb_block *block, enum rb_block_type type)
8870{
8871 struct rb_block *mb = (struct rb_block *)block;
8872 mb->type = type;
8873}
8874static inline const struct rb_block *
8875vm_proc_block(VALUE procval)
8876{
8877 ((void)0);
8878 return &((rb_proc_t *)(((struct RTypedData*)(procval))->data))->block;
8879}
8880static inline const rb_iseq_t *vm_block_iseq(const struct rb_block *block);
8881static inline const VALUE *vm_block_ep(const struct rb_block *block);
8882static inline const rb_iseq_t *
8883vm_proc_iseq(VALUE procval)
8884{
8885 return vm_block_iseq(vm_proc_block(procval));
8886}
8887static inline const VALUE *
8888vm_proc_ep(VALUE procval)
8889{
8890 return vm_block_ep(vm_proc_block(procval));
8891}
8892static inline const rb_iseq_t *
8893vm_block_iseq(const struct rb_block *block)
8894{
8895 switch (vm_block_type(block)) {
8896 case block_type_iseq: return rb_iseq_check(block->as.captured.code.iseq);
8897 case block_type_proc: return vm_proc_iseq(block->as.proc);
8898 case block_type_ifunc:
8899 case block_type_symbol: return ((void *)0);
8900 }
8901 __builtin_unreachable();
8902 return ((void *)0);
8903}
8904static inline const VALUE *
8905vm_block_ep(const struct rb_block *block)
8906{
8907 switch (vm_block_type(block)) {
8908 case block_type_iseq:
8909 case block_type_ifunc: return block->as.captured.ep;
8910 case block_type_proc: return vm_proc_ep(block->as.proc);
8911 case block_type_symbol: return ((void *)0);
8912 }
8913 __builtin_unreachable();
8914 return ((void *)0);
8915}
8916static inline VALUE
8917vm_block_self(const struct rb_block *block)
8918{
8919 switch (vm_block_type(block)) {
8920 case block_type_iseq:
8921 case block_type_ifunc:
8922 return block->as.captured.self;
8923 case block_type_proc:
8924 return vm_block_self(vm_proc_block(block->as.proc));
8925 case block_type_symbol:
8926 return ((VALUE)RUBY_Qundef);
8927 }
8928 __builtin_unreachable();
8929 return ((VALUE)RUBY_Qundef);
8930}
8931static inline VALUE
8932VM_BH_TO_SYMBOL(VALUE block_handler)
8933{
8934 ((void)0);
8935 return block_handler;
8936}
8937static inline VALUE
8938VM_BH_FROM_SYMBOL(VALUE symbol)
8939{
8940 ((void)0);
8941 return symbol;
8942}
8943static inline VALUE
8944VM_BH_TO_PROC(VALUE block_handler)
8945{
8946 ((void)0);
8947 return block_handler;
8948}
8949static inline VALUE
8950VM_BH_FROM_PROC(VALUE procval)
8951{
8952 ((void)0);
8953 return procval;
8954}
8955VALUE rb_thread_alloc(VALUE klass);
8956VALUE rb_binding_alloc(VALUE klass);
8957VALUE rb_proc_alloc(VALUE klass);
8958VALUE rb_proc_dup(VALUE self);
8959extern void rb_vmdebug_stack_dump_raw(const rb_execution_context_t *ec, const rb_control_frame_t *cfp);
8960extern void rb_vmdebug_debug_print_pre(const rb_execution_context_t *ec, const rb_control_frame_t *cfp, const VALUE *_pc);
8961extern void rb_vmdebug_debug_print_post(const rb_execution_context_t *ec, const rb_control_frame_t *cfp);
8962void rb_vm_bugreport(const void *);
8963__attribute__ ((__noreturn__)) void rb_bug_context(const void *, const char *fmt, ...);
8964
8965
8966VALUE rb_iseq_eval(const rb_iseq_t *iseq);
8967VALUE rb_iseq_eval_main(const rb_iseq_t *iseq);
8968VALUE rb_iseq_path(const rb_iseq_t *iseq);
8969VALUE rb_iseq_realpath(const rb_iseq_t *iseq);
8970
8971
8972VALUE rb_iseq_pathobj_new(VALUE path, VALUE realpath);
8973void rb_iseq_pathobj_set(const rb_iseq_t *iseq, VALUE path, VALUE realpath);
8974int rb_ec_frame_method_id_and_class(const rb_execution_context_t *ec, ID *idp, ID *called_idp, VALUE *klassp);
8975void rb_ec_setup_exception(const rb_execution_context_t *ec, VALUE mesg, VALUE cause);
8976VALUE rb_vm_invoke_proc(rb_execution_context_t *ec, rb_proc_t *proc, int argc, const VALUE *argv, VALUE block_handler);
8977VALUE rb_vm_make_proc_lambda(const rb_execution_context_t *ec, const struct rb_captured_block *captured, VALUE klass, int8_t is_lambda);
8978static inline VALUE
8979rb_vm_make_proc(const rb_execution_context_t *ec, const struct rb_captured_block *captured, VALUE klass)
8980{
8981 return rb_vm_make_proc_lambda(ec, captured, klass, 0);
8982}
8983static inline VALUE
8984rb_vm_make_lambda(const rb_execution_context_t *ec, const struct rb_captured_block *captured, VALUE klass)
8985{
8986 return rb_vm_make_proc_lambda(ec, captured, klass, 1);
8987}
8988VALUE rb_vm_make_binding(const rb_execution_context_t *ec, const rb_control_frame_t *src_cfp);
8989VALUE rb_vm_env_local_variables(const rb_env_t *env);
8990const rb_env_t *rb_vm_env_prev_env(const rb_env_t *env);
8991const VALUE *rb_binding_add_dynavars(VALUE bindval, rb_binding_t *bind, int dyncount, const ID *dynvars);
8992void rb_vm_inc_const_missing_count(void);
8993void rb_vm_gvl_destroy(rb_vm_t *vm);
8994VALUE rb_vm_call(rb_execution_context_t *ec, VALUE recv, VALUE id, int argc,
8995 const VALUE *argv, const rb_callable_method_entry_t *me);
8996static void rb_vm_pop_frame(rb_execution_context_t *ec);
8997void rb_thread_start_timer_thread(void);
8998void rb_thread_stop_timer_thread(void);
8999void rb_thread_reset_timer_thread(void);
9000void rb_thread_wakeup_timer_thread(int);
9001static inline void
9002rb_vm_living_threads_init(rb_vm_t *vm)
9003{
9004 list_head_init(&vm->waiting_fds);
9005 list_head_init(&vm->waiting_pids);
9006 list_head_init(&vm->workqueue);
9007 list_head_init(&vm->waiting_grps);
9008 list_head_init(&vm->living_threads);
9009 vm->living_thread_num = 0;
9010}
9011static inline void
9012rb_vm_living_threads_insert(rb_vm_t *vm, rb_thread_t *th)
9013{
9014 list_add_tail_(&vm->living_threads, &th->vmlt_node, "./vm_core.h" ":" "1648");
9015 vm->living_thread_num++;
9016}
9017static inline void
9018rb_vm_living_threads_remove(rb_vm_t *vm, rb_thread_t *th)
9019{
9020 list_del_(&th->vmlt_node, "./vm_core.h" ":" "1655");
9021 vm->living_thread_num--;
9022}
9023typedef int rb_backtrace_iter_func(void *, VALUE, int, VALUE);
9024rb_control_frame_t *rb_vm_get_ruby_level_next_cfp(const rb_execution_context_t *ec, const rb_control_frame_t *cfp);
9025rb_control_frame_t *rb_vm_get_binding_creatable_next_cfp(const rb_execution_context_t *ec, const rb_control_frame_t *cfp);
9026int rb_vm_get_sourceline(const rb_control_frame_t *);
9027VALUE rb_name_err_mesg_new(VALUE mesg, VALUE recv, VALUE method);
9028void rb_vm_stack_to_heap(rb_execution_context_t *ec);
9029void ruby_thread_init_stack(rb_thread_t *th);
9030int rb_vm_control_frame_id_and_class(const rb_control_frame_t *cfp, ID *idp, ID *called_idp, VALUE *klassp);
9031void rb_vm_rewind_cfp(rb_execution_context_t *ec, rb_control_frame_t *cfp);
9032static VALUE rb_vm_bh_to_procval(const rb_execution_context_t *ec, VALUE block_handler);
9033void rb_vm_register_special_exception_str(enum ruby_special_exceptions sp, VALUE exception_class, VALUE mesg);
9034void rb_gc_mark_machine_stack(const rb_execution_context_t *ec);static inline
9035void rb_vm_rewrite_cref(rb_cref_t *node, VALUE old_klass, VALUE new_klass, rb_cref_t **new_cref_ptr);
9036static const rb_callable_method_entry_t *rb_vm_frame_method_entry(const rb_control_frame_t *cfp);
9037VALUE rb_catch_protect(VALUE t, rb_block_call_func *func, VALUE data, enum ruby_tag_type *stateptr);
9038
9039
9040extern rb_vm_t *ruby_current_vm_ptr;
9041extern rb_execution_context_t *ruby_current_execution_context_ptr;
9042extern rb_event_flag_t ruby_vm_event_flags;
9043extern rb_event_flag_t ruby_vm_event_enabled_global_flags;
9044extern unsigned int ruby_vm_event_local_num;
9045
9046
9047static inline rb_thread_t *
9048rb_ec_thread_ptr(const rb_execution_context_t *ec)
9049{
9050 return ec->thread_ptr;
9051}
9052static inline rb_vm_t *
9053rb_ec_vm_ptr(const rb_execution_context_t *ec)
9054{
9055 const rb_thread_t *th = rb_ec_thread_ptr(ec);
9056 if (th) {
9057 return th->vm;
9058 }
9059 else {
9060 return ((void *)0);
9061 }
9062}
9063static inline rb_execution_context_t *
9064rb_current_execution_context(void)
9065{
9066 return ruby_current_execution_context_ptr;
9067}
9068static inline rb_thread_t *
9069rb_current_thread(void)
9070{
9071 const rb_execution_context_t *ec = rb_current_execution_context();
9072 return rb_ec_thread_ptr(ec);
9073}
9074static inline rb_vm_t *
9075rb_current_vm(void)
9076{
9077 ((void)0);
9078 return ruby_current_vm_ptr;
9079}
9080static inline void
9081rb_thread_set_current_raw(const rb_thread_t *th)
9082{
9083 ruby_current_execution_context_ptr = th->ec;
9084}
9085static inline void
9086rb_thread_set_current(rb_thread_t *th)
9087{
9088 if (th->vm->running_thread != th) {
9089 th->running_time_us = 0;
9090 }
9091 rb_thread_set_current_raw(th);
9092 th->vm->running_thread = th;
9093}
9094enum {
9095 TIMER_INTERRUPT_MASK = 0x01,
9096 PENDING_INTERRUPT_MASK = 0x02,
9097 POSTPONED_JOB_INTERRUPT_MASK = 0x04,
9098 TRAP_INTERRUPT_MASK = 0x08
9099};
9100VALUE rb_exc_set_backtrace(VALUE exc, VALUE bt);
9101int rb_signal_buff_size(void);
9102int rb_signal_exec(rb_thread_t *th, int sig);
9103void rb_threadptr_check_signal(rb_thread_t *mth);
9104void rb_threadptr_signal_raise(rb_thread_t *th, int sig);
9105void rb_threadptr_signal_exit(rb_thread_t *th);
9106int rb_threadptr_execute_interrupts(rb_thread_t *, int);
9107void rb_threadptr_interrupt(rb_thread_t *th);
9108void rb_threadptr_unlock_all_locking_mutexes(rb_thread_t *th);
9109void rb_threadptr_pending_interrupt_clear(rb_thread_t *th);
9110void rb_threadptr_pending_interrupt_enque(rb_thread_t *th, VALUE v);
9111void rb_ec_error_print(rb_execution_context_t * volatile ec, volatile VALUE errinfo);
9112void rb_execution_context_mark(const rb_execution_context_t *ec);
9113void rb_fiber_close(rb_fiber_t *fib);
9114void Init_native_thread(rb_thread_t *th);
9115static inline void
9116rb_vm_check_ints(rb_execution_context_t *ec)
9117{
9118 ((void)0);
9119 if ((__builtin_expect(!!(((ec)->interrupt_flag & ~(ec)->interrupt_mask)), 0))) {
9120 rb_threadptr_execute_interrupts(rb_ec_thread_ptr(ec), 0);
9121 }
9122}
9124 rb_event_flag_t event;
9126 const rb_control_frame_t *cfp;
9127 VALUE self;
9128 ID id;
9129 ID called_id;
9130 VALUE klass;
9131 VALUE data;
9132 int klass_solved;
9133 int lineno;
9134 VALUE path;
9135};
9136void rb_hook_list_mark(rb_hook_list_t *hooks);
9137void rb_hook_list_free(rb_hook_list_t *hooks);
9138void rb_hook_list_connect_tracepoint(VALUE target, rb_hook_list_t *list, VALUE tpval, unsigned int target_line);
9139void rb_hook_list_remove_tracepoint(rb_hook_list_t *list, VALUE tpval);
9140void rb_exec_event_hooks(struct rb_trace_arg_struct *trace_arg, rb_hook_list_t *hooks, int pop_p);
9141static inline void
9142rb_exec_event_hook_orig(rb_execution_context_t *ec, rb_hook_list_t *hooks, rb_event_flag_t flag,
9143 VALUE self, ID id, ID called_id, VALUE klass, VALUE data, int pop_p)
9144{
9145 struct rb_trace_arg_struct trace_arg;
9146 ((void)0);
9147 trace_arg.event = flag;
9148 trace_arg.ec = ec;
9149 trace_arg.cfp = ec->cfp;
9150 trace_arg.self = self;
9151 trace_arg.id = id;
9152 trace_arg.called_id = called_id;
9153 trace_arg.klass = klass;
9154 trace_arg.data = data;
9155 trace_arg.path = ((VALUE)RUBY_Qundef);
9156 trace_arg.klass_solved = 0;
9157 rb_exec_event_hooks(&trace_arg, hooks, pop_p);
9158}
9159static inline rb_hook_list_t *
9160rb_vm_global_hooks(const rb_execution_context_t *ec)
9161{
9162 return &rb_ec_vm_ptr(ec)->global_hooks;
9163}
9164static inline void
9165rb_exec_event_hook_script_compiled(rb_execution_context_t *ec, const rb_iseq_t *iseq, VALUE eval_script)
9166{
9167 do { const rb_event_flag_t flag_arg_ = (0x2000); rb_hook_list_t *hooks_arg_ = (rb_vm_global_hooks(ec)); if ((__builtin_expect(!!((hooks_arg_)->events & (flag_arg_)), 0))) { rb_exec_event_hook_orig(ec, hooks_arg_, flag_arg_, ec->cfp->self, 0, 0, 0, !((VALUE)(eval_script) != ((VALUE)RUBY_Qnil)) ? (VALUE)iseq : __extension__ ({ const VALUE args_to_new_ary[] = {eval_script, (VALUE)iseq}; if (__builtin_constant_p(2)) { __extension__ _Static_assert(((int)(sizeof(args_to_new_ary) / sizeof((args_to_new_ary)[0]))) == (2), "rb_ary_new_from_args" ": " "numberof(args_to_new_ary) == (2)"); } rb_ary_new_from_values(((int)(sizeof(args_to_new_ary) / sizeof((args_to_new_ary)[0]))), args_to_new_ary); }), 0); } } while (0);
9168}
9169
9170
9171int rb_thread_check_trap_pending(void);
9172extern VALUE rb_get_coverages(void);
9173extern void rb_set_coverages(VALUE, int, VALUE);
9174extern void rb_clear_coverages(void);
9175extern void rb_reset_coverages(void);
9176void rb_postponed_job_flush(rb_vm_t *vm);
9177
9178
9179
9180
9181VALUE ruby_debug_print_value(int level, int debug_level, const char *header, VALUE v);
9182ID ruby_debug_print_id(int level, int debug_level, const char *header, ID id);
9183NODE *ruby_debug_print_node(int level, int debug_level, const char *header, const NODE *node);
9184int ruby_debug_print_indent(int level, int debug_level, int indent_level);
9185void ruby_debug_breakpoint(void);
9186void ruby_debug_gc_check_func(void);
9187void ruby_set_debug_option(const char *str);
9188
9189
9190extern const int ruby_api_version[];
9191static inline size_t
9192rb_call_info_kw_arg_bytes(int keyword_len)
9193{
9194 return sizeof(struct rb_call_info_kw_arg) + sizeof(VALUE) * (keyword_len - 1);
9195}
9196static inline rb_snum_t
9197ISEQ_FLIP_CNT_INCREMENT(const rb_iseq_t *iseq)
9198{
9199 rb_snum_t cnt = iseq->body->variable.flip_count;
9200 iseq->body->variable.flip_count += 1;
9201 return cnt;
9202}
9203static inline VALUE *
9204ISEQ_ORIGINAL_ISEQ(const rb_iseq_t *iseq)
9205{
9206 return iseq->body->variable.original_iseq;
9207}
9208static inline void
9209ISEQ_ORIGINAL_ISEQ_CLEAR(const rb_iseq_t *iseq)
9210{
9211 void *ptr = iseq->body->variable.original_iseq;
9212 iseq->body->variable.original_iseq = ((void *)0);
9213 if (ptr) {
9214 ruby_xfree(ptr);
9215 }
9216}
9217static inline VALUE *
9218ISEQ_ORIGINAL_ISEQ_ALLOC(const rb_iseq_t *iseq, long size)
9219{
9220 return iseq->body->variable.original_iseq =
9221 ruby_xmalloc2(size, sizeof(VALUE));
9222}
9224 const VALUE err_info;
9225 VALUE mark_ary;
9226 const VALUE catch_table_ary;
9227 struct iseq_label_data *start_label;
9228 struct iseq_label_data *end_label;
9229 struct iseq_label_data *redo_label;
9230 const rb_iseq_t *current_block;
9231 VALUE ensure_node;
9232 VALUE for_iseq;
9233 struct iseq_compile_data_ensure_node_stack *ensure_node_stack;
9234 struct iseq_compile_data_storage *storage_head;
9235 struct iseq_compile_data_storage *storage_current;
9236 int loopval_popped;
9237 int last_line;
9238 int label_no;
9239 int node_level;
9240 unsigned int ci_index;
9241 unsigned int ci_kw_index;
9242 const rb_compile_option_t *option;
9243 struct rb_id_table *ivar_cache_table;
9244};
9245static inline struct iseq_compile_data *
9246ISEQ_COMPILE_DATA(const rb_iseq_t *iseq)
9247{
9248 if (iseq->flags & ((VALUE)RUBY_FL_USER6)) {
9249 return iseq->aux.compile_data;
9250 }
9251 else {
9252 return ((void *)0);
9253 }
9254}
9255static inline void
9256ISEQ_COMPILE_DATA_ALLOC(rb_iseq_t *iseq)
9257{
9258 iseq->aux.compile_data = (((struct iseq_compile_data*)ruby_xcalloc((size_t)(1),sizeof(struct iseq_compile_data))));
9259 iseq->flags |= ((VALUE)RUBY_FL_USER6);
9260}
9261static inline void
9262ISEQ_COMPILE_DATA_CLEAR(rb_iseq_t *iseq)
9263{
9264 iseq->flags &= ~((VALUE)RUBY_FL_USER6);
9265 iseq->aux.compile_data = ((void *)0);
9266}
9267static inline rb_iseq_t *
9268iseq_imemo_alloc(void)
9269{
9270 return (rb_iseq_t *)rb_imemo_new(imemo_iseq, 0, 0, 0, 0);
9271}
9272VALUE rb_iseq_ibf_dump(const rb_iseq_t *iseq, VALUE opt);
9273void rb_ibf_load_iseq_complete(rb_iseq_t *iseq);
9274const rb_iseq_t *rb_iseq_ibf_load(VALUE str);
9275VALUE rb_iseq_ibf_load_extra_data(VALUE str);
9276void rb_iseq_init_trace(rb_iseq_t *iseq);
9277int rb_iseq_add_local_tracepoint_recursively(const rb_iseq_t *iseq, rb_event_flag_t turnon_events, VALUE tpval, unsigned int target_line);
9278int rb_iseq_remove_local_tracepoint_recursively(const rb_iseq_t *iseq, VALUE tpval);
9279const rb_iseq_t *rb_iseq_load_iseq(VALUE fname);
9280unsigned int *rb_iseq_insns_info_decode_positions(const struct rb_iseq_constant_body *body);
9281
9282
9283VALUE rb_iseq_compile_node(rb_iseq_t *iseq, const NODE *node);
9284VALUE rb_iseq_compile_ifunc(rb_iseq_t *iseq, const struct vm_ifunc *ifunc);
9285int rb_iseq_translate_threaded_code(rb_iseq_t *iseq);
9286VALUE *rb_iseq_original_iseq(const rb_iseq_t *iseq);
9287void rb_iseq_build_from_ary(rb_iseq_t *iseq, VALUE misc,
9288 VALUE locals, VALUE args,
9289 VALUE exception, VALUE body);
9290VALUE rb_iseq_load(VALUE data, VALUE parent, VALUE opt);
9291VALUE rb_iseq_parameters(const rb_iseq_t *iseq, int is_proc);
9292struct st_table *ruby_insn_make_insn_table(void);
9293unsigned int rb_iseq_line_no(const rb_iseq_t *iseq, size_t pos);
9294void rb_iseq_trace_set(const rb_iseq_t *iseq, rb_event_flag_t turnon_events);
9295void rb_iseq_trace_set_all(rb_event_flag_t turnon_events);
9296void rb_iseq_trace_on_all(void);
9297void rb_iseq_insns_info_encode_positions(const rb_iseq_t *iseq);
9298VALUE rb_iseqw_new(const rb_iseq_t *iseq);
9299const rb_iseq_t *rb_iseqw_to_iseq(VALUE iseqw);
9300VALUE rb_iseq_absolute_path(const rb_iseq_t *iseq);
9301VALUE rb_iseq_label(const rb_iseq_t *iseq);
9302VALUE rb_iseq_base_label(const rb_iseq_t *iseq);
9303VALUE rb_iseq_first_lineno(const rb_iseq_t *iseq);
9304VALUE rb_iseq_method_name(const rb_iseq_t *iseq);
9305void rb_iseq_code_location(const rb_iseq_t *iseq, int *first_lineno, int *first_column, int *last_lineno, int *last_column);
9306void rb_iseq_remove_coverage_all(void);
9307const rb_iseq_t *rb_method_iseq(VALUE body);
9308const rb_iseq_t *rb_proc_get_iseq(VALUE proc, int *is_proc);
9310 unsigned int inline_const_cache: 1;
9311 unsigned int peephole_optimization: 1;
9312 unsigned int tailcall_optimization: 1;
9313 unsigned int specialized_instruction: 1;
9314 unsigned int operands_unification: 1;
9315 unsigned int instructions_unification: 1;
9316 unsigned int stack_caching: 1;
9317 unsigned int frozen_string_literal: 1;
9318 unsigned int debug_frozen_string_literal: 1;
9319 unsigned int coverage_enabled: 1;
9320 int debug_level;
9321};
9323 int line_no;
9324 rb_event_flag_t events;
9325};
9327 enum catch_type {
9328 CATCH_TYPE_RESCUE = (((VALUE)(1))<<1 | RUBY_FIXNUM_FLAG),
9329 CATCH_TYPE_ENSURE = (((VALUE)(2))<<1 | RUBY_FIXNUM_FLAG),
9330 CATCH_TYPE_RETRY = (((VALUE)(3))<<1 | RUBY_FIXNUM_FLAG),
9331 CATCH_TYPE_BREAK = (((VALUE)(4))<<1 | RUBY_FIXNUM_FLAG),
9332 CATCH_TYPE_REDO = (((VALUE)(5))<<1 | RUBY_FIXNUM_FLAG),
9333 CATCH_TYPE_NEXT = (((VALUE)(6))<<1 | RUBY_FIXNUM_FLAG)
9334 } type;
9335 const rb_iseq_t *iseq;
9336 unsigned int start;
9337 unsigned int end;
9338 unsigned int cont;
9339 unsigned int sp;
9340};
9341struct iseq_catch_table { unsigned int size; struct iseq_catch_table_entry entries[]; } __attribute__((packed));
9342static inline int
9343iseq_catch_table_bytes(int n)
9344{
9345 enum {
9346 catch_table_entry_size = sizeof(struct iseq_catch_table_entry),
9347 catch_table_entries_max = (0x7fffffff - __builtin_offsetof (struct iseq_catch_table, entries)) / catch_table_entry_size
9348 };
9349 if (n > catch_table_entries_max) rb_fatal("too large iseq_catch_table - %d", n);
9350 return (int)(__builtin_offsetof (struct iseq_catch_table, entries) +
9351 n * catch_table_entry_size);
9352}
9354 struct iseq_compile_data_storage *next;
9355 unsigned int pos;
9356 unsigned int size;
9357 char buff[];
9358};
9359enum defined_type {
9360 DEFINED_NOT_DEFINED,
9361 DEFINED_NIL = 1,
9362 DEFINED_IVAR,
9363 DEFINED_LVAR,
9364 DEFINED_GVAR,
9365 DEFINED_CVAR,
9366 DEFINED_CONST,
9367 DEFINED_METHOD,
9368 DEFINED_YIELD,
9369 DEFINED_ZSUPER,
9370 DEFINED_SELF,
9371 DEFINED_TRUE,
9372 DEFINED_FALSE,
9373 DEFINED_ASGN,
9374 DEFINED_EXPR,
9375 DEFINED_IVAR2,
9376 DEFINED_REF,
9377 DEFINED_FUNC
9378};
9379VALUE rb_iseq_defined_string(enum defined_type type);
9380void rb_iseq_make_compile_option(struct rb_compile_option_struct *option, VALUE opt);
9381VALUE rb_iseq_local_variables(const rb_iseq_t *iseq);
9382
9383
9384static inline void
9385vm_passed_block_handler_set(rb_execution_context_t *ec, VALUE block_handler)
9386{
9387 vm_block_handler_verify(block_handler);
9388 ec->passed_block_handler = block_handler;
9389}
9390static inline void
9391pass_passed_block_handler(rb_execution_context_t *ec)
9392{
9393 VALUE block_handler = rb_vm_frame_block_handler(ec->cfp);
9394 vm_passed_block_handler_set(ec, block_handler);
9395 VM_ENV_FLAGS_SET(ec->cfp->ep, VM_FRAME_FLAG_PASSED);
9396}
9397
9398extern int *__errno_location (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
9399extern char *program_invocation_name;
9400extern char *program_invocation_short_name;
9401typedef int error_t;
9402
9403static inline int
9404rb_ec_tag_state(const rb_execution_context_t *ec)
9405{
9406 enum ruby_tag_type state = ec->tag->state;
9407 ec->tag->state = RUBY_TAG_NONE;
9408 return state;
9409}
9410__attribute__ ((__noreturn__)) static inline void rb_ec_tag_jump(const rb_execution_context_t *ec, enum ruby_tag_type st);
9411static inline void
9412rb_ec_tag_jump(const rb_execution_context_t *ec, enum ruby_tag_type st)
9413{
9414 ec->tag->state = st;
9415 __builtin_longjmp(((ec->tag->buf)),(1));
9416}
9417static inline VALUE
9418CREF_CLASS(const rb_cref_t *cref)
9419{
9420 return cref->klass;
9421}
9422static inline rb_cref_t *
9423CREF_NEXT(const rb_cref_t *cref)
9424{
9425 return cref->next;
9426}
9427static inline const rb_scope_visibility_t *
9428CREF_SCOPE_VISI(const rb_cref_t *cref)
9429{
9430 return &cref->scope_visi;
9431}
9432static inline VALUE
9433CREF_REFINEMENTS(const rb_cref_t *cref)
9434{
9435 return cref->refinements;
9436}
9437static inline void
9438CREF_REFINEMENTS_SET(rb_cref_t *cref, VALUE refs)
9439{
9440 rb_obj_write((VALUE)(cref), (VALUE *)(&cref->refinements), (VALUE)(refs), "./eval_intern.h", 237);
9441}
9442static inline int
9443CREF_PUSHED_BY_EVAL(const rb_cref_t *cref)
9444{
9445 return cref->flags & ((VALUE)RUBY_FL_USER5);
9446}
9447static inline void
9448CREF_PUSHED_BY_EVAL_SET(rb_cref_t *cref)
9449{
9450 cref->flags |= ((VALUE)RUBY_FL_USER5);
9451}
9452static inline int
9453CREF_OMOD_SHARED(const rb_cref_t *cref)
9454{
9455 return cref->flags & ((VALUE)RUBY_FL_USER6);
9456}
9457static inline void
9458CREF_OMOD_SHARED_SET(rb_cref_t *cref)
9459{
9460 cref->flags |= ((VALUE)RUBY_FL_USER6);
9461}
9462static inline void
9463CREF_OMOD_SHARED_UNSET(rb_cref_t *cref)
9464{
9465 cref->flags &= ~((VALUE)RUBY_FL_USER6);
9466}
9467void rb_thread_cleanup(void);
9468void rb_thread_wait_other_threads(void);
9469enum {
9470 RAISED_EXCEPTION = 1,
9471 RAISED_STACKOVERFLOW = 2,
9472 RAISED_NOMEMORY = 4
9473};
9474int rb_ec_set_raised(rb_execution_context_t *ec);
9475int rb_ec_reset_raised(rb_execution_context_t *ec);
9476int rb_ec_stack_check(rb_execution_context_t *ec);
9477VALUE rb_f_eval(int argc, const VALUE *argv, VALUE self);
9478VALUE rb_make_exception(int argc, const VALUE *argv);
9479__attribute__ ((__noreturn__)) void rb_method_name_error(VALUE, VALUE);
9480__attribute__ ((__noreturn__)) void rb_fiber_start(void);
9481__attribute__ ((__noreturn__)) void rb_print_undef(VALUE, ID, rb_method_visibility_t);
9482__attribute__ ((__noreturn__)) void rb_print_undef_str(VALUE, VALUE);
9483__attribute__ ((__noreturn__)) void rb_print_inaccessible(VALUE, ID, rb_method_visibility_t);
9484__attribute__ ((__noreturn__)) void rb_vm_localjump_error(const char *,VALUE, int);
9485VALUE rb_vm_make_jump_tag_but_local_jump(int state, VALUE val);
9486rb_cref_t *rb_vm_cref(void);
9487rb_cref_t *rb_vm_cref_replace_with_duplicated_cref(void);
9488VALUE rb_vm_call_cfunc(VALUE recv, VALUE (*func)(VALUE), VALUE arg, VALUE block_handler, VALUE filename);
9489void rb_vm_set_progname(VALUE filename);
9490void rb_thread_terminate_all(void);
9491VALUE rb_vm_cbase(void);
9492VALUE rb_ec_backtrace_object(const rb_execution_context_t *ec);
9493VALUE rb_ec_backtrace_str_ary(const rb_execution_context_t *ec, long lev, long n);
9495 const char *classname;
9496 const char *methodname;
9497 const char *filename;
9498 int line_no;
9499 volatile VALUE klass;
9500 volatile VALUE name;
9501};
9502__attribute__ ((__noinline__)) int rb_dtrace_setup(rb_execution_context_t *, VALUE, ID, struct ruby_dtrace_method_hook_args *);
9503VALUE rb_str_concat_literals(size_t, const VALUE*);
9504__attribute__ ((__pure__)) static inline const VALUE *VM_EP_LEP(const VALUE *);
9505static inline const VALUE *
9506VM_EP_LEP(const VALUE *ep)
9507{
9508 while (!VM_ENV_LOCAL_P(ep)) {
9509 ep = VM_ENV_PREV_EP(ep);
9510 }
9511 return ep;
9512}
9513static inline const rb_control_frame_t *
9514rb_vm_search_cf_from_ep(const rb_execution_context_t *ec, const rb_control_frame_t *cfp, const VALUE * const ep)
9515{
9516 if (!ep) {
9517 return ((void *)0);
9518 }
9519 else {
9520 const rb_control_frame_t * const eocfp = RUBY_VM_END_CONTROL_FRAME(ec);
9521 while (cfp < eocfp) {
9522 if (cfp->ep == ep) {
9523 return cfp;
9524 }
9525 cfp = ((cfp)+1);
9526 }
9527 return ((void *)0);
9528 }
9529}static inline
9530const VALUE *
9531rb_vm_ep_local_ep(const VALUE *ep)
9532{
9533 return VM_EP_LEP(ep);
9534}
9535__attribute__ ((__pure__)) static inline const VALUE *VM_CF_LEP(const rb_control_frame_t * const cfp);
9536static inline const VALUE *
9537VM_CF_LEP(const rb_control_frame_t * const cfp)
9538{
9539 return VM_EP_LEP(cfp->ep);
9540}
9541static inline const VALUE *
9542VM_CF_PREV_EP(const rb_control_frame_t * const cfp)
9543{
9544 return VM_ENV_PREV_EP(cfp->ep);
9545}
9546__attribute__ ((__pure__)) static inline VALUE VM_CF_BLOCK_HANDLER(const rb_control_frame_t * const cfp);
9547static inline VALUE
9548VM_CF_BLOCK_HANDLER(const rb_control_frame_t * const cfp)
9549{
9550 const VALUE *ep = VM_CF_LEP(cfp);
9551 return VM_ENV_BLOCK_HANDLER(ep);
9552}static inline
9553VALUE
9554rb_vm_frame_block_handler(const rb_control_frame_t *cfp)
9555{
9556 return VM_CF_BLOCK_HANDLER(cfp);
9557}
9558static struct rb_captured_block *
9559VM_CFP_TO_CAPTURED_BLOCK(const rb_control_frame_t *cfp)
9560{
9561 ((void)0);
9562 return (struct rb_captured_block *)&cfp->self;
9563}
9564static rb_control_frame_t *
9565VM_CAPTURED_BLOCK_TO_CFP(const struct rb_captured_block *captured)
9566{
9567 rb_control_frame_t *cfp = ((rb_control_frame_t *)((VALUE *)(captured) - 3));
9568 ((void)0);
9569 ((void)0);
9570 return cfp;
9571}
9572static int
9573VM_BH_FROM_CFP_P(VALUE block_handler, const rb_control_frame_t *cfp)
9574{
9575 const struct rb_captured_block *captured = VM_CFP_TO_CAPTURED_BLOCK(cfp);
9576 return ((void *)((block_handler) & ~0x03)) == captured;
9577}
9578static VALUE
9579vm_passed_block_handler(rb_execution_context_t *ec)
9580{
9581 VALUE block_handler = ec->passed_block_handler;
9582 ec->passed_block_handler = 0;
9583 vm_block_handler_verify(block_handler);
9584 return block_handler;
9585}
9586static rb_cref_t *
9587vm_cref_new0(VALUE klass, rb_method_visibility_t visi, int module_func, rb_cref_t *prev_cref, int pushed_by_eval, int use_prev_prev)
9588{
9589 VALUE refinements = ((VALUE)RUBY_Qnil);
9590 int omod_shared = 0;
9591 rb_cref_t *cref;
9592 union {
9594 VALUE value;
9595 } scope_visi;
9596 scope_visi.visi.method_visi = visi;
9597 scope_visi.visi.module_func = module_func;
9598 if (prev_cref != ((void *)0) && prev_cref != (void *)1 ) {
9599 refinements = CREF_REFINEMENTS(prev_cref);
9600 if (!!((VALUE)(refinements) != ((VALUE)RUBY_Qnil))) {
9601 omod_shared = 1;
9602 CREF_OMOD_SHARED_SET(prev_cref);
9603 }
9604 }
9605 cref = (rb_cref_t *)rb_imemo_new(imemo_cref, klass, (VALUE)(use_prev_prev ? CREF_NEXT(prev_cref) : prev_cref), scope_visi.value, refinements);
9606 if (pushed_by_eval) CREF_PUSHED_BY_EVAL_SET(cref);
9607 if (omod_shared) CREF_OMOD_SHARED_SET(cref);
9608 return cref;
9609}
9610static rb_cref_t *
9611vm_cref_new(VALUE klass, rb_method_visibility_t visi, int module_func, rb_cref_t *prev_cref, int pushed_by_eval)
9612{
9613 return vm_cref_new0(klass, visi, module_func, prev_cref, pushed_by_eval, 0);
9614}
9615static rb_cref_t *
9616vm_cref_new_use_prev(VALUE klass, rb_method_visibility_t visi, int module_func, rb_cref_t *prev_cref, int pushed_by_eval)
9617{
9618 return vm_cref_new0(klass, visi, module_func, prev_cref, pushed_by_eval, 1);
9619}
9620static int
9621ref_delete_symkey(VALUE key, VALUE value, VALUE unused)
9622{
9623 return ((((VALUE)(key)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(key) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(key) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(key))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) ? ST_DELETE : ST_CONTINUE;
9624}
9625static rb_cref_t *
9626vm_cref_dup(const rb_cref_t *cref)
9627{
9628 VALUE klass = CREF_CLASS(cref);
9629 const rb_scope_visibility_t *visi = CREF_SCOPE_VISI(cref);
9630 rb_cref_t *next_cref = CREF_NEXT(cref), *new_cref;
9631 int pushed_by_eval = CREF_PUSHED_BY_EVAL(cref);
9632 new_cref = vm_cref_new(klass, visi->method_visi, visi->module_func, next_cref, pushed_by_eval);
9633 if (!!((VALUE)(CREF_REFINEMENTS(cref)) != ((VALUE)RUBY_Qnil))) {
9634 VALUE ref = rb_hash_dup(CREF_REFINEMENTS(cref));
9635 rb_hash_foreach(ref, ref_delete_symkey, ((VALUE)RUBY_Qnil));
9636 CREF_REFINEMENTS_SET(new_cref, ref);
9637 CREF_OMOD_SHARED_UNSET(new_cref);
9638 }
9639 return new_cref;
9640}
9641static rb_cref_t *
9642vm_cref_new_toplevel(rb_execution_context_t *ec)
9643{
9644 rb_cref_t *cref = vm_cref_new(rb_cObject, METHOD_VISI_PRIVATE , 0, ((void *)0), 0);
9645 VALUE top_wrapper = rb_ec_thread_ptr(ec)->top_wrapper;
9646 if (top_wrapper) {
9647 cref = vm_cref_new(top_wrapper, METHOD_VISI_PRIVATE, 0, cref, 0);
9648 }
9649 return cref;
9650}static inline
9651rb_cref_t *
9652rb_vm_cref_new_toplevel(void)
9653{
9654 return vm_cref_new_toplevel(rb_current_execution_context());
9655}
9656static void
9657vm_cref_dump(const char *mesg, const rb_cref_t *cref)
9658{
9659 fprintf(stderr, "vm_cref_dump: %s (%p)\n", mesg, (void *)cref);
9660 while (cref) {
9661 fprintf(stderr, "= cref| klass: %s\n", (!(((struct RBasic*)(rb_class_path(CREF_CLASS(cref))))->flags & RSTRING_NOEMBED) ? ((struct RString*)(rb_class_path(CREF_CLASS(cref))))->as.ary : ((struct RString*)(rb_class_path(CREF_CLASS(cref))))->as.heap.ptr));
9662 cref = CREF_NEXT(cref);
9663 }
9664}static inline
9665void
9666rb_vm_block_ep_update(VALUE obj, const struct rb_block *dst, const VALUE *ep)
9667{
9668 *((const VALUE **)&dst->as.captured.ep) = ep;
9669 rb_obj_written((VALUE)(obj), (VALUE)(((VALUE)RUBY_Qundef)), (VALUE)(VM_ENV_ENVVAL(ep)), "./vm.c", 292);
9670}
9671static void
9672vm_bind_update_env(VALUE bindval, rb_binding_t *bind, VALUE envval)
9673{
9674 const rb_env_t *env = (rb_env_t *)envval;
9675 rb_obj_write((VALUE)(bindval), (VALUE *)(&bind->block.as.captured.code.iseq), (VALUE)(env->iseq), "./vm.c", 299);
9676 rb_vm_block_ep_update(bindval, &bind->block, env->ep);
9677}
9678static VALUE vm_make_env_object(const rb_execution_context_t *ec, rb_control_frame_t *cfp);
9679extern VALUE rb_vm_invoke_bmethod(rb_execution_context_t *ec, rb_proc_t *proc, VALUE self,
9680 int argc, const VALUE *argv, VALUE block_handler,
9681 const rb_callable_method_entry_t *me);
9682static VALUE vm_invoke_proc(rb_execution_context_t *ec, rb_proc_t *proc, VALUE self, int argc, const VALUE *argv, VALUE block_handler);
9683static VALUE rb_block_param_proxy;
9684enum rb_mjit_iseq_func {
9685 NOT_ADDED_JIT_ISEQ_FUNC = 0,
9686 NOT_READY_JIT_ISEQ_FUNC = 1,
9687 NOT_COMPILED_JIT_ISEQ_FUNC = 2,
9688 LAST_JIT_ISEQ_FUNC = 3
9689};
9691 char on;
9692 char save_temps;
9693 char warnings;
9694 char debug;
9695 unsigned int wait;
9696 unsigned int min_calls;
9697 int verbose;
9698 int max_cache_size;
9699};
9700typedef VALUE (*mjit_func_t)(rb_execution_context_t *, rb_control_frame_t *);
9701
9702
9703extern struct mjit_options mjit_opts;
9704extern int mjit_call_p;
9705extern void mjit_add_iseq_to_process(const rb_iseq_t *iseq);
9706extern VALUE mjit_wait_call(rb_execution_context_t *ec, struct rb_iseq_constant_body *body);
9707
9708
9709extern int mjit_compile(FILE *f, const struct rb_iseq_constant_body *body, const char *funcname, struct rb_call_cache *cc_entries, union iseq_inline_storage_entry *is_entries);
9710extern void mjit_init(struct mjit_options *opts);
9711extern void mjit_postponed_job_register_start_hook(void);
9712extern void mjit_postponed_job_register_finish_hook(void);
9713extern void mjit_gc_start_hook(void);
9714extern void mjit_gc_finish_hook(void);
9715extern void mjit_free_iseq(const rb_iseq_t *iseq);
9716extern void mjit_mark(void);
9717extern struct mjit_cont *mjit_cont_new(rb_execution_context_t *ec);
9718extern void mjit_cont_free(struct mjit_cont *cont);
9719extern void mjit_add_class_serial(rb_serial_t class_serial);
9720extern void mjit_remove_class_serial(rb_serial_t class_serial);
9721static inline int
9722mjit_target_iseq_p(struct rb_iseq_constant_body *body)
9723{
9724 return (body->type == ISEQ_TYPE_METHOD || body->type == ISEQ_TYPE_BLOCK)
9725 && body->iseq_size < 1000;
9726}
9727static inline VALUE
9728mjit_exec(rb_execution_context_t *ec)
9729{
9730 const rb_iseq_t *iseq;
9731 struct rb_iseq_constant_body *body;
9732 long unsigned total_calls;
9733 mjit_func_t func;
9734 if (!mjit_call_p)
9735 return ((VALUE)RUBY_Qundef);
9736 iseq = ec->cfp->iseq;
9737 body = iseq->body;
9738 total_calls = ++body->total_calls;
9739 func = body->jit_func;
9740 if ((__builtin_expect(!!((uintptr_t)func <= (uintptr_t)LAST_JIT_ISEQ_FUNC), 0))) {
9741 switch ((enum rb_mjit_iseq_func)func) {
9742 case NOT_ADDED_JIT_ISEQ_FUNC:
9743 if (total_calls == mjit_opts.min_calls && mjit_target_iseq_p(body)) {
9744 mjit_add_iseq_to_process(iseq);
9745 if ((__builtin_expect(!!(mjit_opts.wait), 0))) {
9746 return mjit_wait_call(ec, body);
9747 }
9748 }
9749 return ((VALUE)RUBY_Qundef);
9750 case NOT_READY_JIT_ISEQ_FUNC:
9751 case NOT_COMPILED_JIT_ISEQ_FUNC:
9752 return ((VALUE)RUBY_Qundef);
9753 default:
9754 break;
9755 }
9756 }
9757 return func(ec, ec->cfp);
9758}
9759void mjit_child_after_fork(void);
9760
9761
9762extern VALUE ruby_vm_const_missing_count;
9763extern rb_serial_t ruby_vm_global_method_state;
9764extern rb_serial_t ruby_vm_global_constant_state;
9765extern rb_serial_t ruby_vm_class_serial;
9766
9767
9768static inline int
9769rb_obj_hidden_p(VALUE obj)
9770{
9771 if ((((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0))) {
9772 return 0;
9773 }
9774 else {
9775 return (((struct RBasic*)(obj))->klass) ? 0 : 1;
9776 }
9777}
9778enum vm_regan_regtype {
9779 VM_REGAN_PC = 0,
9780 VM_REGAN_SP = 1,
9781 VM_REGAN_EP = 2,
9782 VM_REGAN_CFP = 3,
9783 VM_REGAN_SELF = 4,
9784 VM_REGAN_ISEQ = 5
9785};
9786enum vm_regan_acttype {
9787 VM_REGAN_ACT_GET = 0,
9788 VM_REGAN_ACT_SET = 1
9789};
9790extern rb_method_definition_t *rb_method_definition_create(rb_method_type_t type, ID mid);
9791extern void rb_method_definition_set(const rb_method_entry_t *me, rb_method_definition_t *def, void *opts);
9792extern int rb_method_definition_eq(const rb_method_definition_t *d1, const rb_method_definition_t *d2);
9793extern VALUE rb_make_no_method_exception(VALUE exc, VALUE format, VALUE obj,
9794 int argc, const VALUE *argv, int priv);
9795static inline struct vm_throw_data *
9796THROW_DATA_NEW(VALUE val, const rb_control_frame_t *cf, VALUE st)
9797{
9798 return (struct vm_throw_data *)rb_imemo_new(imemo_throw_data, val, (VALUE)cf, st, 0);
9799}
9800static inline VALUE
9801THROW_DATA_VAL(const struct vm_throw_data *obj)
9802{
9803 ((void)0);
9804 return obj->throw_obj;
9805}
9806static inline const rb_control_frame_t *
9807THROW_DATA_CATCH_FRAME(const struct vm_throw_data *obj)
9808{
9809 ((void)0);
9810 return obj->catch_frame;
9811}
9812static inline int
9813THROW_DATA_STATE(const struct vm_throw_data *obj)
9814{
9815 ((void)0);
9816 return (int)obj->throw_state;
9817}
9818static inline int
9819THROW_DATA_CONSUMED_P(const struct vm_throw_data *obj)
9820{
9821 ((void)0);
9822 return obj->flags & ((VALUE)RUBY_FL_USER4);
9823}
9824static inline void
9825THROW_DATA_CATCH_FRAME_SET(struct vm_throw_data *obj, const rb_control_frame_t *cfp)
9826{
9827 ((void)0);
9828 obj->catch_frame = cfp;
9829}
9830static inline void
9831THROW_DATA_STATE_SET(struct vm_throw_data *obj, int st)
9832{
9833 ((void)0);
9834 obj->throw_state = (VALUE)st;
9835}
9836static inline void
9837THROW_DATA_CONSUMED_SET(struct vm_throw_data *obj)
9838{
9839 if (( ((RUBY_T_IMEMO) == RUBY_T_FIXNUM) ? (((int)(long)((VALUE)(obj)))&RUBY_FIXNUM_FLAG) : ((RUBY_T_IMEMO) == RUBY_T_TRUE) ? (((VALUE)(obj)) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_IMEMO) == RUBY_T_FALSE) ? (((VALUE)(obj)) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_IMEMO) == RUBY_T_NIL) ? (((VALUE)(obj)) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_IMEMO) == RUBY_T_UNDEF) ? (((VALUE)(obj)) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_IMEMO) == RUBY_T_SYMBOL) ? ((((VALUE)((VALUE)(obj))&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)((VALUE)(obj)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((VALUE)(obj)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((VALUE)(obj)))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_IMEMO) == RUBY_T_FLOAT) ? ( ((((int)(long)((VALUE)(obj)))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)((VALUE)(obj)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((VALUE)(obj)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((VALUE)(obj)))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)((VALUE)(obj)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((VALUE)(obj)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((VALUE)(obj)))->flags & RUBY_T_MASK) == (RUBY_T_IMEMO))) &&
9840 THROW_DATA_STATE(obj) == RUBY_TAG_BREAK) {
9841 obj->flags |= ((VALUE)RUBY_FL_USER4);
9842 }
9843}
9844typedef long OFFSET;
9845typedef unsigned long lindex_t;
9846typedef VALUE GENTRY;
9847typedef rb_iseq_t *ISEQ;
9848enum ruby_vminsn_type {
9849 YARVINSN_nop,
9850 YARVINSN_getlocal,
9851 YARVINSN_setlocal,
9852 YARVINSN_getblockparam,
9853 YARVINSN_setblockparam,
9854 YARVINSN_getblockparamproxy,
9855 YARVINSN_getspecial,
9856 YARVINSN_setspecial,
9857 YARVINSN_getinstancevariable,
9858 YARVINSN_setinstancevariable,
9859 YARVINSN_getclassvariable,
9860 YARVINSN_setclassvariable,
9861 YARVINSN_getconstant,
9862 YARVINSN_setconstant,
9863 YARVINSN_getglobal,
9864 YARVINSN_setglobal,
9865 YARVINSN_putnil,
9866 YARVINSN_putself,
9867 YARVINSN_putobject,
9868 YARVINSN_putspecialobject,
9869 YARVINSN_putiseq,
9870 YARVINSN_putstring,
9871 YARVINSN_concatstrings,
9872 YARVINSN_tostring,
9873 YARVINSN_freezestring,
9874 YARVINSN_toregexp,
9875 YARVINSN_intern,
9876 YARVINSN_newarray,
9877 YARVINSN_duparray,
9878 YARVINSN_duphash,
9879 YARVINSN_expandarray,
9880 YARVINSN_concatarray,
9881 YARVINSN_splatarray,
9882 YARVINSN_newhash,
9883 YARVINSN_newrange,
9884 YARVINSN_pop,
9885 YARVINSN_dup,
9886 YARVINSN_dupn,
9887 YARVINSN_swap,
9888 YARVINSN_reverse,
9889 YARVINSN_reput,
9890 YARVINSN_topn,
9891 YARVINSN_setn,
9892 YARVINSN_adjuststack,
9893 YARVINSN_defined,
9894 YARVINSN_checkmatch,
9895 YARVINSN_checkkeyword,
9896 YARVINSN_checktype,
9897 YARVINSN_defineclass,
9898 YARVINSN_send,
9899 YARVINSN_opt_send_without_block,
9900 YARVINSN_opt_str_freeze,
9901 YARVINSN_opt_str_uminus,
9902 YARVINSN_opt_newarray_max,
9903 YARVINSN_opt_newarray_min,
9904 YARVINSN_invokesuper,
9905 YARVINSN_invokeblock,
9906 YARVINSN_leave,
9907 YARVINSN_throw,
9908 YARVINSN_jump,
9909 YARVINSN_branchif,
9910 YARVINSN_branchunless,
9911 YARVINSN_branchnil,
9912 YARVINSN_opt_getinlinecache,
9913 YARVINSN_opt_setinlinecache,
9914 YARVINSN_once,
9915 YARVINSN_opt_case_dispatch,
9916 YARVINSN_opt_plus,
9917 YARVINSN_opt_minus,
9918 YARVINSN_opt_mult,
9919 YARVINSN_opt_div,
9920 YARVINSN_opt_mod,
9921 YARVINSN_opt_eq,
9922 YARVINSN_opt_neq,
9923 YARVINSN_opt_lt,
9924 YARVINSN_opt_le,
9925 YARVINSN_opt_gt,
9926 YARVINSN_opt_ge,
9927 YARVINSN_opt_ltlt,
9928 YARVINSN_opt_and,
9929 YARVINSN_opt_or,
9930 YARVINSN_opt_aref,
9931 YARVINSN_opt_aset,
9932 YARVINSN_opt_aset_with,
9933 YARVINSN_opt_aref_with,
9934 YARVINSN_opt_length,
9935 YARVINSN_opt_size,
9936 YARVINSN_opt_empty_p,
9937 YARVINSN_opt_succ,
9938 YARVINSN_opt_not,
9939 YARVINSN_opt_regexpmatch1,
9940 YARVINSN_opt_regexpmatch2,
9941 YARVINSN_opt_call_c_function,
9942 YARVINSN_bitblt,
9943 YARVINSN_answer,
9944 YARVINSN_getlocal_WC_0,
9945 YARVINSN_getlocal_WC_1,
9946 YARVINSN_setlocal_WC_0,
9947 YARVINSN_setlocal_WC_1,
9948 YARVINSN_putobject_INT2FIX_0_,
9949 YARVINSN_putobject_INT2FIX_1_,
9950 YARVINSN_trace_nop,
9951 YARVINSN_trace_getlocal,
9952 YARVINSN_trace_setlocal,
9953 YARVINSN_trace_getblockparam,
9954 YARVINSN_trace_setblockparam,
9955 YARVINSN_trace_getblockparamproxy,
9956 YARVINSN_trace_getspecial,
9957 YARVINSN_trace_setspecial,
9958 YARVINSN_trace_getinstancevariable,
9959 YARVINSN_trace_setinstancevariable,
9960 YARVINSN_trace_getclassvariable,
9961 YARVINSN_trace_setclassvariable,
9962 YARVINSN_trace_getconstant,
9963 YARVINSN_trace_setconstant,
9964 YARVINSN_trace_getglobal,
9965 YARVINSN_trace_setglobal,
9966 YARVINSN_trace_putnil,
9967 YARVINSN_trace_putself,
9968 YARVINSN_trace_putobject,
9969 YARVINSN_trace_putspecialobject,
9970 YARVINSN_trace_putiseq,
9971 YARVINSN_trace_putstring,
9972 YARVINSN_trace_concatstrings,
9973 YARVINSN_trace_tostring,
9974 YARVINSN_trace_freezestring,
9975 YARVINSN_trace_toregexp,
9976 YARVINSN_trace_intern,
9977 YARVINSN_trace_newarray,
9978 YARVINSN_trace_duparray,
9979 YARVINSN_trace_duphash,
9980 YARVINSN_trace_expandarray,
9981 YARVINSN_trace_concatarray,
9982 YARVINSN_trace_splatarray,
9983 YARVINSN_trace_newhash,
9984 YARVINSN_trace_newrange,
9985 YARVINSN_trace_pop,
9986 YARVINSN_trace_dup,
9987 YARVINSN_trace_dupn,
9988 YARVINSN_trace_swap,
9989 YARVINSN_trace_reverse,
9990 YARVINSN_trace_reput,
9991 YARVINSN_trace_topn,
9992 YARVINSN_trace_setn,
9993 YARVINSN_trace_adjuststack,
9994 YARVINSN_trace_defined,
9995 YARVINSN_trace_checkmatch,
9996 YARVINSN_trace_checkkeyword,
9997 YARVINSN_trace_checktype,
9998 YARVINSN_trace_defineclass,
9999 YARVINSN_trace_send,
10000 YARVINSN_trace_opt_send_without_block,
10001 YARVINSN_trace_opt_str_freeze,
10002 YARVINSN_trace_opt_str_uminus,
10003 YARVINSN_trace_opt_newarray_max,
10004 YARVINSN_trace_opt_newarray_min,
10005 YARVINSN_trace_invokesuper,
10006 YARVINSN_trace_invokeblock,
10007 YARVINSN_trace_leave,
10008 YARVINSN_trace_throw,
10009 YARVINSN_trace_jump,
10010 YARVINSN_trace_branchif,
10011 YARVINSN_trace_branchunless,
10012 YARVINSN_trace_branchnil,
10013 YARVINSN_trace_opt_getinlinecache,
10014 YARVINSN_trace_opt_setinlinecache,
10015 YARVINSN_trace_once,
10016 YARVINSN_trace_opt_case_dispatch,
10017 YARVINSN_trace_opt_plus,
10018 YARVINSN_trace_opt_minus,
10019 YARVINSN_trace_opt_mult,
10020 YARVINSN_trace_opt_div,
10021 YARVINSN_trace_opt_mod,
10022 YARVINSN_trace_opt_eq,
10023 YARVINSN_trace_opt_neq,
10024 YARVINSN_trace_opt_lt,
10025 YARVINSN_trace_opt_le,
10026 YARVINSN_trace_opt_gt,
10027 YARVINSN_trace_opt_ge,
10028 YARVINSN_trace_opt_ltlt,
10029 YARVINSN_trace_opt_and,
10030 YARVINSN_trace_opt_or,
10031 YARVINSN_trace_opt_aref,
10032 YARVINSN_trace_opt_aset,
10033 YARVINSN_trace_opt_aset_with,
10034 YARVINSN_trace_opt_aref_with,
10035 YARVINSN_trace_opt_length,
10036 YARVINSN_trace_opt_size,
10037 YARVINSN_trace_opt_empty_p,
10038 YARVINSN_trace_opt_succ,
10039 YARVINSN_trace_opt_not,
10040 YARVINSN_trace_opt_regexpmatch1,
10041 YARVINSN_trace_opt_regexpmatch2,
10042 YARVINSN_trace_opt_call_c_function,
10043 YARVINSN_trace_bitblt,
10044 YARVINSN_trace_answer,
10045 YARVINSN_trace_getlocal_WC_0,
10046 YARVINSN_trace_getlocal_WC_1,
10047 YARVINSN_trace_setlocal_WC_0,
10048 YARVINSN_trace_setlocal_WC_1,
10049 YARVINSN_trace_putobject_INT2FIX_0_,
10050 YARVINSN_trace_putobject_INT2FIX_1_,
10051 VM_INSTRUCTION_SIZE
10052};
10053typedef enum {
10054 CONST_DEPRECATED = 0x100,
10055 CONST_VISIBILITY_MASK = 0xff,
10056 CONST_PUBLIC = 0x00,
10057 CONST_PRIVATE,
10058 CONST_VISIBILITY_MAX
10059} rb_const_flag_t;
10061 rb_const_flag_t flag;
10062 int line;
10063 const VALUE value;
10064 const VALUE file;
10066VALUE rb_mod_private_constant(int argc, const VALUE *argv, VALUE obj);
10067VALUE rb_mod_public_constant(int argc, const VALUE *argv, VALUE obj);
10068VALUE rb_mod_deprecate_constant(int argc, const VALUE *argv, VALUE obj);
10069void rb_free_const_table(struct rb_id_table *tbl);
10070VALUE rb_public_const_get(VALUE klass, ID id);
10071VALUE rb_public_const_get_at(VALUE klass, ID id);
10072VALUE rb_public_const_get_from(VALUE klass, ID id);
10073int rb_public_const_defined(VALUE klass, ID id);
10074int rb_public_const_defined_at(VALUE klass, ID id);
10075int rb_public_const_defined_from(VALUE klass, ID id);
10076rb_const_entry_t *rb_const_lookup(VALUE klass, ID id);
10077int rb_autoloading_value(VALUE mod, ID id, VALUE *value, rb_const_flag_t *flag);
10078enum rb_debug_counter_type {
10079RB_DEBUG_COUNTER_mc_inline_hit,
10080RB_DEBUG_COUNTER_mc_inline_miss,
10081RB_DEBUG_COUNTER_mc_global_hit,
10082RB_DEBUG_COUNTER_mc_global_miss,
10083RB_DEBUG_COUNTER_mc_global_state_miss,
10084RB_DEBUG_COUNTER_mc_class_serial_miss,
10085RB_DEBUG_COUNTER_mc_cme_complement,
10086RB_DEBUG_COUNTER_mc_cme_complement_hit,
10087RB_DEBUG_COUNTER_mc_search_super,
10088RB_DEBUG_COUNTER_frame_push,
10089RB_DEBUG_COUNTER_frame_push_method,
10090RB_DEBUG_COUNTER_frame_push_block,
10091RB_DEBUG_COUNTER_frame_push_class,
10092RB_DEBUG_COUNTER_frame_push_top,
10093RB_DEBUG_COUNTER_frame_push_cfunc,
10094RB_DEBUG_COUNTER_frame_push_ifunc,
10095RB_DEBUG_COUNTER_frame_push_eval,
10096RB_DEBUG_COUNTER_frame_push_rescue,
10097RB_DEBUG_COUNTER_frame_push_dummy,
10098RB_DEBUG_COUNTER_frame_R2R,
10099RB_DEBUG_COUNTER_frame_R2C,
10100RB_DEBUG_COUNTER_frame_C2C,
10101RB_DEBUG_COUNTER_frame_C2R,
10102RB_DEBUG_COUNTER_ivar_get_ic_hit,
10103RB_DEBUG_COUNTER_ivar_get_ic_miss,
10104RB_DEBUG_COUNTER_ivar_get_ic_miss_serial,
10105RB_DEBUG_COUNTER_ivar_get_ic_miss_unset,
10106RB_DEBUG_COUNTER_ivar_get_ic_miss_noobject,
10107RB_DEBUG_COUNTER_ivar_set_ic_hit,
10108RB_DEBUG_COUNTER_ivar_set_ic_miss,
10109RB_DEBUG_COUNTER_ivar_set_ic_miss_serial,
10110RB_DEBUG_COUNTER_ivar_set_ic_miss_unset,
10111RB_DEBUG_COUNTER_ivar_set_ic_miss_oorange,
10112RB_DEBUG_COUNTER_ivar_set_ic_miss_noobject,
10113RB_DEBUG_COUNTER_ivar_get_base,
10114RB_DEBUG_COUNTER_ivar_set_base,
10115RB_DEBUG_COUNTER_lvar_get,
10116RB_DEBUG_COUNTER_lvar_get_dynamic,
10117RB_DEBUG_COUNTER_lvar_set,
10118RB_DEBUG_COUNTER_lvar_set_dynamic,
10119RB_DEBUG_COUNTER_lvar_set_slowpath,
10120RB_DEBUG_COUNTER_gc_count,
10121RB_DEBUG_COUNTER_gc_minor_newobj,
10122RB_DEBUG_COUNTER_gc_minor_malloc,
10123RB_DEBUG_COUNTER_gc_minor_method,
10124RB_DEBUG_COUNTER_gc_minor_capi,
10125RB_DEBUG_COUNTER_gc_minor_stress,
10126RB_DEBUG_COUNTER_gc_major_nofree,
10127RB_DEBUG_COUNTER_gc_major_oldgen,
10128RB_DEBUG_COUNTER_gc_major_shady,
10129RB_DEBUG_COUNTER_gc_major_force,
10130RB_DEBUG_COUNTER_gc_major_oldmalloc,
10131RB_DEBUG_COUNTER_obj_newobj,
10132RB_DEBUG_COUNTER_obj_newobj_slowpath,
10133RB_DEBUG_COUNTER_obj_newobj_wb_unprotected,
10134RB_DEBUG_COUNTER_obj_free,
10135RB_DEBUG_COUNTER_obj_promote,
10136RB_DEBUG_COUNTER_obj_wb_unprotect,
10137RB_DEBUG_COUNTER_obj_obj_embed,
10138RB_DEBUG_COUNTER_obj_obj_transient,
10139RB_DEBUG_COUNTER_obj_obj_ptr,
10140RB_DEBUG_COUNTER_obj_str_ptr,
10141RB_DEBUG_COUNTER_obj_str_embed,
10142RB_DEBUG_COUNTER_obj_str_shared,
10143RB_DEBUG_COUNTER_obj_str_nofree,
10144RB_DEBUG_COUNTER_obj_str_fstr,
10145RB_DEBUG_COUNTER_obj_ary_embed,
10146RB_DEBUG_COUNTER_obj_ary_transient,
10147RB_DEBUG_COUNTER_obj_ary_ptr,
10148RB_DEBUG_COUNTER_obj_hash_empty,
10149RB_DEBUG_COUNTER_obj_hash_under4,
10150RB_DEBUG_COUNTER_obj_hash_ge4,
10151RB_DEBUG_COUNTER_obj_hash_ge8,
10152RB_DEBUG_COUNTER_obj_hash_ar,
10153RB_DEBUG_COUNTER_obj_hash_st,
10154RB_DEBUG_COUNTER_obj_hash_transient,
10155RB_DEBUG_COUNTER_obj_hash_force_convert,
10156RB_DEBUG_COUNTER_obj_struct_embed,
10157RB_DEBUG_COUNTER_obj_struct_transient,
10158RB_DEBUG_COUNTER_obj_struct_ptr,
10159RB_DEBUG_COUNTER_obj_regexp_ptr,
10160RB_DEBUG_COUNTER_obj_data_empty,
10161RB_DEBUG_COUNTER_obj_data_xfree,
10162RB_DEBUG_COUNTER_obj_data_imm_free,
10163RB_DEBUG_COUNTER_obj_data_zombie,
10164RB_DEBUG_COUNTER_obj_match_ptr,
10165RB_DEBUG_COUNTER_obj_file_ptr,
10166RB_DEBUG_COUNTER_obj_bignum_ptr,
10167RB_DEBUG_COUNTER_obj_symbol,
10168RB_DEBUG_COUNTER_obj_imemo_ment,
10169RB_DEBUG_COUNTER_obj_imemo_iseq,
10170RB_DEBUG_COUNTER_obj_imemo_env,
10171RB_DEBUG_COUNTER_obj_imemo_tmpbuf,
10172RB_DEBUG_COUNTER_obj_imemo_ast,
10173RB_DEBUG_COUNTER_obj_imemo_cref,
10174RB_DEBUG_COUNTER_obj_imemo_svar,
10175RB_DEBUG_COUNTER_obj_imemo_throw_data,
10176RB_DEBUG_COUNTER_obj_imemo_ifunc,
10177RB_DEBUG_COUNTER_obj_imemo_memo,
10178RB_DEBUG_COUNTER_obj_imemo_parser_strterm,
10179RB_DEBUG_COUNTER_obj_iclass_ptr,
10180RB_DEBUG_COUNTER_obj_class_ptr,
10181RB_DEBUG_COUNTER_obj_module_ptr,
10182RB_DEBUG_COUNTER_heap_xmalloc,
10183RB_DEBUG_COUNTER_heap_xrealloc,
10184RB_DEBUG_COUNTER_heap_xfree,
10185RB_DEBUG_COUNTER_theap_alloc,
10186RB_DEBUG_COUNTER_theap_alloc_fail,
10187RB_DEBUG_COUNTER_theap_evacuate,
10188 RB_DEBUG_COUNTER_MAX
10189};
10190void rb_debug_counter_show_results(const char *msg);
10191static rb_control_frame_t *vm_get_ruby_level_caller_cfp(const rb_execution_context_t *ec, const rb_control_frame_t *cfp);
10192static VALUE
10193ruby_vm_special_exception_copy(VALUE exc)
10194{
10195 VALUE e = rb_obj_alloc(rb_class_real((((struct RBasic*)(exc))->klass)));
10196 rb_obj_copy_ivar(e, exc);
10197 return e;
10198}
10199__attribute__ ((__noreturn__)) static void ec_stack_overflow(rb_execution_context_t *ec, int);
10200static void
10201ec_stack_overflow(rb_execution_context_t *ec, int setup)
10202{
10203 VALUE mesg = rb_ec_vm_ptr(ec)->special_exceptions[ruby_error_sysstack];
10204 ec->raised_flag = RAISED_STACKOVERFLOW;
10205 if (setup) {
10206 VALUE at = rb_ec_backtrace_object(ec);
10207 mesg = ruby_vm_special_exception_copy(mesg);
10208 rb_ivar_set(mesg, idBt, at);
10209 rb_ivar_set(mesg, idBt_locations, at);
10210 }
10211 ec->errinfo = mesg;
10212 rb_ec_tag_jump(ec, RUBY_TAG_RAISE);
10213}
10214__attribute__ ((__noreturn__)) static void vm_stackoverflow(void);
10215static void
10216vm_stackoverflow(void)
10217{
10218 ec_stack_overflow(rb_current_execution_context(), 1);
10219}
10220__attribute__ ((__noreturn__)) static void rb_ec_stack_overflow(rb_execution_context_t *ec, int crit);
10221static void
10222rb_ec_stack_overflow(rb_execution_context_t *ec, int crit)
10223{
10224 if (crit || rb_during_gc()) {
10225 ec->raised_flag = RAISED_STACKOVERFLOW;
10226 ec->errinfo = rb_ec_vm_ptr(ec)->special_exceptions[ruby_error_stackfatal];
10227 rb_ec_tag_jump(ec, RUBY_TAG_RAISE);
10228 }
10229 ec_stack_overflow(ec, 1);
10230}
10231static inline rb_control_frame_t *
10232vm_push_frame(rb_execution_context_t *ec,
10233 const rb_iseq_t *iseq,
10234 VALUE type,
10235 VALUE self,
10236 VALUE specval,
10237 VALUE cref_or_me,
10238 const VALUE *pc,
10239 VALUE *sp,
10240 int local_size,
10241 int stack_max)
10242{
10243 rb_control_frame_t *const cfp = ec->cfp - 1;
10244 int i;
10245 ;
10246 ((void)0);
10247 if ((__builtin_expect(!!(!(!(1/!!(sizeof(*(sp)) == sizeof(VALUE))) || !(1/!!(sizeof(*(cfp)) == sizeof(rb_control_frame_t))) || ((rb_control_frame_t *)((sp) + (local_size + stack_max)) + 1) >= (cfp))), 1))) {(void)0;} else vm_stackoverflow();
10248 ec->cfp = cfp;
10249 cfp->pc = (VALUE *)pc;
10250 cfp->iseq = (rb_iseq_t *)iseq;
10251 cfp->self = self;
10252 cfp->block_code = ((void *)0);
10253 for (i=0; i < local_size; i++) {
10254 *sp++ = ((VALUE)RUBY_Qnil);
10255 }
10256 ((void)0);
10257 ((void)0);
10258 ((void)0);
10259 *sp++ = cref_or_me;
10260 *sp++ = specval ;
10261 *sp = type;
10262 cfp->ep = cfp->bp = sp;
10263 cfp->sp = sp + 1;
10264 if (0 == 2) {
10265 rb_vmdebug_stack_dump_raw(rb_current_execution_context(), rb_current_execution_context()->cfp);
10266 }
10267 return cfp;
10268}static inline
10270rb_vm_push_frame(rb_execution_context_t *ec,
10271 const rb_iseq_t *iseq,
10272 VALUE type,
10273 VALUE self,
10274 VALUE specval,
10275 VALUE cref_or_me,
10276 const VALUE *pc,
10277 VALUE *sp,
10278 int local_size,
10279 int stack_max)
10280{
10281 return vm_push_frame(ec, iseq, type, self, specval, cref_or_me, pc, sp, local_size, stack_max);
10282}
10283static inline int
10284vm_pop_frame(rb_execution_context_t *ec, rb_control_frame_t *cfp, const VALUE *ep)
10285{
10286 VALUE flags = ep[( 0)];
10287 if (0 >= 4) rb_gc_verify_internal_consistency();
10288 if (0 == 2) rb_vmdebug_stack_dump_raw(rb_current_execution_context(), rb_current_execution_context()->cfp);
10289 ec->cfp = ((cfp)+1);
10290 return flags & VM_FRAME_FLAG_FINISH;
10291}
10292static void
10293rb_vm_pop_frame(rb_execution_context_t *ec)
10294{
10295 vm_pop_frame(ec, ec->cfp, ec->cfp->ep);
10296}
10297static inline VALUE
10298rb_arity_error_new(int argc, int min, int max)
10299{
10300 VALUE err_mess = 0;
10301 if (min == max) {
10302 err_mess = rb_sprintf("wrong number of arguments (given %d, expected %d)", argc, min);
10303 }
10304 else if (max == (-1)) {
10305 err_mess = rb_sprintf("wrong number of arguments (given %d, expected %d+)", argc, min);
10306 }
10307 else {
10308 err_mess = rb_sprintf("wrong number of arguments (given %d, expected %d..%d)", argc, min, max);
10309 }
10310 return rb_exc_new_str(rb_eArgError, err_mess);
10311}
10312static void
10313rb_error_arity(int argc, int min, int max)
10314{
10315 rb_exc_raise(rb_arity_error_new(argc, min, max));
10316}
10317__attribute__ ((__noinline__)) static void vm_env_write_slowpath(const VALUE *ep, int index, VALUE v);
10318static void
10319vm_env_write_slowpath(const VALUE *ep, int index, VALUE v)
10320{
10321 rb_gc_writebarrier_remember(VM_ENV_ENVVAL(ep));
10322 VM_FORCE_WRITE(&ep[index], v);
10323 VM_ENV_FLAGS_UNSET(ep, VM_ENV_FLAG_WB_REQUIRED);
10324 ((void)0);
10325}
10326static inline void
10327vm_env_write(const VALUE *ep, int index, VALUE v)
10328{
10329 VALUE flags = ep[( 0)];
10330 if ((__builtin_expect(!!((flags & VM_ENV_FLAG_WB_REQUIRED) == 0), 1))) {
10331 VM_STACK_ENV_WRITE(ep, index, v);
10332 }
10333 else {
10334 vm_env_write_slowpath(ep, index, v);
10335 }
10336}
10337static VALUE
10338rb_vm_bh_to_procval(const rb_execution_context_t *ec, VALUE block_handler)
10339{
10340 if (block_handler == 0) {
10341 return ((VALUE)RUBY_Qnil);
10342 }
10343 else {
10344 switch (vm_block_handler_type(block_handler)) {
10345 case block_handler_type_iseq:
10346 case block_handler_type_ifunc:
10347 return rb_vm_make_proc(ec, VM_BH_TO_CAPT_BLOCK(block_handler), rb_cProc);
10348 case block_handler_type_symbol:
10349 return rb_sym_to_proc(VM_BH_TO_SYMBOL(block_handler));
10350 case block_handler_type_proc:
10351 return VM_BH_TO_PROC(block_handler);
10352 default:
10353 __builtin_unreachable();
10354 }
10355 }
10356}
10357static inline struct vm_svar *
10358lep_svar(const rb_execution_context_t *ec, const VALUE *lep)
10359{
10360 VALUE svar;
10361 if (lep && (ec == ((void *)0) || ec->root_lep != lep)) {
10362 svar = lep[(-2)];
10363 }
10364 else {
10365 svar = ec->root_svar;
10366 }
10367 ((void)0);
10368 return (struct vm_svar *)svar;
10369}
10370static inline void
10371lep_svar_write(const rb_execution_context_t *ec, const VALUE *lep, const struct vm_svar *svar)
10372{
10373 ((void)0);
10374 if (lep && (ec == ((void *)0) || ec->root_lep != lep)) {
10375 vm_env_write(lep, (-2), (VALUE)svar);
10376 }
10377 else {
10378 rb_obj_write((VALUE)(rb_ec_thread_ptr(ec)->self), (VALUE *)(&ec->root_svar), (VALUE)(svar), "./vm_insnhelper.c", 441);
10379 }
10380}
10381static VALUE
10382lep_svar_get(const rb_execution_context_t *ec, const VALUE *lep, rb_num_t key)
10383{
10384 const struct vm_svar *svar = lep_svar(ec, lep);
10385 if ((VALUE)svar == ((VALUE)RUBY_Qfalse) || imemo_type((VALUE)svar) != imemo_svar) return ((VALUE)RUBY_Qnil);
10386 switch (key) {
10387 case VM_SVAR_LASTLINE:
10388 return svar->lastline;
10389 case VM_SVAR_BACKREF:
10390 return svar->backref;
10391 default: {
10392 const VALUE ary = svar->others;
10393 if (!((VALUE)(ary) != ((VALUE)RUBY_Qnil))) {
10394 return ((VALUE)RUBY_Qnil);
10395 }
10396 else {
10397 return rb_ary_entry(ary, key - VM_SVAR_EXTRA_START);
10398 }
10399 }
10400 }
10401}
10402static struct vm_svar *
10403svar_new(VALUE obj)
10404{
10405 return (struct vm_svar *)rb_imemo_new(imemo_svar, ((VALUE)RUBY_Qnil), ((VALUE)RUBY_Qnil), ((VALUE)RUBY_Qnil), obj);
10406}
10407static void
10408lep_svar_set(const rb_execution_context_t *ec, const VALUE *lep, rb_num_t key, VALUE val)
10409{
10410 struct vm_svar *svar = lep_svar(ec, lep);
10411 if ((VALUE)svar == ((VALUE)RUBY_Qfalse) || imemo_type((VALUE)svar) != imemo_svar) {
10412 lep_svar_write(ec, lep, svar = svar_new((VALUE)svar));
10413 }
10414 switch (key) {
10415 case VM_SVAR_LASTLINE:
10416 rb_obj_write((VALUE)(svar), (VALUE *)(&svar->lastline), (VALUE)(val), "./vm_insnhelper.c", 487);
10417 return;
10418 case VM_SVAR_BACKREF:
10419 rb_obj_write((VALUE)(svar), (VALUE *)(&svar->backref), (VALUE)(val), "./vm_insnhelper.c", 490);
10420 return;
10421 default: {
10422 VALUE ary = svar->others;
10423 if (!((VALUE)(ary) != ((VALUE)RUBY_Qnil))) {
10424 rb_obj_write((VALUE)(svar), (VALUE *)(&svar->others), (VALUE)(ary = rb_ary_new()), "./vm_insnhelper.c", 496);
10425 }
10426 rb_ary_store(ary, key - VM_SVAR_EXTRA_START, val);
10427 }
10428 }
10429}
10430static inline VALUE
10431vm_getspecial(const rb_execution_context_t *ec, const VALUE *lep, rb_num_t key, rb_num_t type)
10432{
10433 VALUE val;
10434 if (type == 0) {
10435 val = lep_svar_get(ec, lep, key);
10436 }
10437 else {
10438 VALUE backref = lep_svar_get(ec, lep, VM_SVAR_BACKREF);
10439 if (type & 0x01) {
10440 switch (type >> 1) {
10441 case '&':
10442 val = rb_reg_last_match(backref);
10443 break;
10444 case '`':
10445 val = rb_reg_match_pre(backref);
10446 break;
10447 case '\'':
10448 val = rb_reg_match_post(backref);
10449 break;
10450 case '+':
10451 val = rb_reg_match_last(backref);
10452 break;
10453 default:
10454 rb_bug("unexpected back-ref");
10455 }
10456 }
10457 else {
10458 val = rb_reg_nth_match((int)(type >> 1), backref);
10459 }
10460 }
10461 return val;
10462}
10463__attribute__ ((__pure__)) static rb_callable_method_entry_t *check_method_entry(VALUE obj, int can_be_svar);
10465check_method_entry(VALUE obj, int can_be_svar)
10466{
10467 if (obj == ((VALUE)RUBY_Qfalse)) return ((void *)0);
10468 switch (imemo_type(obj)) {
10469 case imemo_ment:
10470 return (rb_callable_method_entry_t *)obj;
10471 case imemo_cref:
10472 return ((void *)0);
10473 case imemo_svar:
10474 if (can_be_svar) {
10475 return check_method_entry(((struct vm_svar *)obj)->cref_or_me, 0);
10476 }
10477 default:
10478 return ((void *)0);
10479 }
10480}
10481static const rb_callable_method_entry_t *
10482rb_vm_frame_method_entry(const rb_control_frame_t *cfp)
10483{
10484 const VALUE *ep = cfp->ep;
10486 while (!VM_ENV_LOCAL_P(ep)) {
10487 if ((me = check_method_entry(ep[(-2)], 0)) != ((void *)0)) return me;
10488 ep = VM_ENV_PREV_EP(ep);
10489 }
10490 return check_method_entry(ep[(-2)], 1);
10491}
10492static rb_cref_t *
10493method_entry_cref(rb_callable_method_entry_t *me)
10494{
10495 switch (me->def->type) {
10496 case VM_METHOD_TYPE_ISEQ:
10497 return me->def->body.iseq.cref;
10498 default:
10499 return ((void *)0);
10500 }
10501}
10502__attribute__ ((__pure__)) static rb_cref_t *check_cref(VALUE, int);
10503static rb_cref_t *
10504check_cref(VALUE obj, int can_be_svar)
10505{
10506 if (obj == ((VALUE)RUBY_Qfalse)) return ((void *)0);
10507 switch (imemo_type(obj)) {
10508 case imemo_ment:
10509 return method_entry_cref((rb_callable_method_entry_t *)obj);
10510 case imemo_cref:
10511 return (rb_cref_t *)obj;
10512 case imemo_svar:
10513 if (can_be_svar) {
10514 return check_cref(((struct vm_svar *)obj)->cref_or_me, 0);
10515 }
10516 default:
10517 return ((void *)0);
10518 }
10519}
10520static inline rb_cref_t *
10521vm_env_cref(const VALUE *ep)
10522{
10523 rb_cref_t *cref;
10524 while (!VM_ENV_LOCAL_P(ep)) {
10525 if ((cref = check_cref(ep[(-2)], 0)) != ((void *)0)) return cref;
10526 ep = VM_ENV_PREV_EP(ep);
10527 }
10528 return check_cref(ep[(-2)], 1);
10529}
10530static int
10531is_cref(const VALUE v, int can_be_svar)
10532{
10533 if (( ((RUBY_T_IMEMO) == RUBY_T_FIXNUM) ? (((int)(long)(v))&RUBY_FIXNUM_FLAG) : ((RUBY_T_IMEMO) == RUBY_T_TRUE) ? ((v) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_IMEMO) == RUBY_T_FALSE) ? ((v) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_IMEMO) == RUBY_T_NIL) ? ((v) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_IMEMO) == RUBY_T_UNDEF) ? ((v) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_IMEMO) == RUBY_T_SYMBOL) ? ((((VALUE)(v)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(v) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(v) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(v))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_IMEMO) == RUBY_T_FLOAT) ? ( ((((int)(long)(v))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(v) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(v) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(v))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(v) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(v) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(v))->flags & RUBY_T_MASK) == (RUBY_T_IMEMO)))) {
10534 switch (imemo_type(v)) {
10535 case imemo_cref:
10536 return 1;
10537 case imemo_svar:
10538 if (can_be_svar) return is_cref(((struct vm_svar *)v)->cref_or_me, 0);
10539 default:
10540 break;
10541 }
10542 }
10543 return 0;
10544}
10545static int
10546vm_env_cref_by_cref(const VALUE *ep)
10547{
10548 while (!VM_ENV_LOCAL_P(ep)) {
10549 if (is_cref(ep[(-2)], 0)) return 1;
10550 ep = VM_ENV_PREV_EP(ep);
10551 }
10552 return is_cref(ep[(-2)], 1);
10553}
10554static rb_cref_t *
10555cref_replace_with_duplicated_cref_each_frame(const VALUE *vptr, int can_be_svar, VALUE parent)
10556{
10557 const VALUE v = *vptr;
10558 rb_cref_t *cref, *new_cref;
10559 if (( ((RUBY_T_IMEMO) == RUBY_T_FIXNUM) ? (((int)(long)(v))&RUBY_FIXNUM_FLAG) : ((RUBY_T_IMEMO) == RUBY_T_TRUE) ? ((v) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_IMEMO) == RUBY_T_FALSE) ? ((v) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_IMEMO) == RUBY_T_NIL) ? ((v) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_IMEMO) == RUBY_T_UNDEF) ? ((v) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_IMEMO) == RUBY_T_SYMBOL) ? ((((VALUE)(v)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(v) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(v) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(v))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_IMEMO) == RUBY_T_FLOAT) ? ( ((((int)(long)(v))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(v) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(v) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(v))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(v) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(v) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(v))->flags & RUBY_T_MASK) == (RUBY_T_IMEMO)))) {
10560 switch (imemo_type(v)) {
10561 case imemo_cref:
10562 cref = (rb_cref_t *)v;
10563 new_cref = vm_cref_dup(cref);
10564 if (parent) {
10565 rb_obj_write((VALUE)(parent), (VALUE *)(vptr), (VALUE)(new_cref), "./vm_insnhelper.c", 671);
10566 }
10567 else {
10568 VM_FORCE_WRITE(vptr, (VALUE)new_cref);
10569 }
10570 return (rb_cref_t *)new_cref;
10571 case imemo_svar:
10572 if (can_be_svar) {
10573 return cref_replace_with_duplicated_cref_each_frame((const VALUE *)&((struct vm_svar *)v)->cref_or_me, 0, v);
10574 }
10575 case imemo_ment:
10576 rb_bug("cref_replace_with_duplicated_cref_each_frame: unreachable");
10577 default:
10578 break;
10579 }
10580 }
10581 return 0;
10582}
10583static rb_cref_t *
10584vm_cref_replace_with_duplicated_cref(const VALUE *ep)
10585{
10586 if (vm_env_cref_by_cref(ep)) {
10587 rb_cref_t *cref;
10588 VALUE envval;
10589 while (!VM_ENV_LOCAL_P(ep)) {
10590 envval = VM_ENV_ESCAPED_P(ep) ? VM_ENV_ENVVAL(ep) : ((VALUE)RUBY_Qfalse);
10591 if ((cref = cref_replace_with_duplicated_cref_each_frame(&ep[(-2)], 0, envval)) != ((void *)0)) {
10592 return cref;
10593 }
10594 ep = VM_ENV_PREV_EP(ep);
10595 }
10596 envval = VM_ENV_ESCAPED_P(ep) ? VM_ENV_ENVVAL(ep) : ((VALUE)RUBY_Qfalse);
10597 return cref_replace_with_duplicated_cref_each_frame(&ep[(-2)], 1, envval);
10598 }
10599 else {
10600 rb_bug("vm_cref_dup: unreachable");
10601 }
10602}
10603static rb_cref_t *
10604rb_vm_get_cref(const VALUE *ep)
10605{
10606 rb_cref_t *cref = vm_env_cref(ep);
10607 if (cref != ((void *)0)) {
10608 return cref;
10609 }
10610 else {
10611 rb_bug("rb_vm_get_cref: unreachable");
10612 }
10613}
10614static const rb_cref_t *
10615vm_get_const_key_cref(const VALUE *ep)
10616{
10617 const rb_cref_t *cref = rb_vm_get_cref(ep);
10618 const rb_cref_t *key_cref = cref;
10619 while (cref) {
10620 if (((!(((VALUE)(CREF_CLASS(cref)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(CREF_CLASS(cref)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(CREF_CLASS(cref)))->flags & RUBY_T_MASK) != RUBY_T_NODE)?(((struct RBasic*)((CREF_CLASS(cref))))->flags&((((VALUE)RUBY_FL_SINGLETON)))):0)) {
10621 return key_cref;
10622 }
10623 cref = CREF_NEXT(cref);
10624 }
10625 return ((void *)0);
10626}static inline
10627void
10628rb_vm_rewrite_cref(rb_cref_t *cref, VALUE old_klass, VALUE new_klass, rb_cref_t **new_cref_ptr)
10629{
10630 rb_cref_t *new_cref;
10631 while (cref) {
10632 if (CREF_CLASS(cref) == old_klass) {
10633 new_cref = vm_cref_new_use_prev(new_klass, METHOD_VISI_UNDEF, 0, cref, 0);
10634 *new_cref_ptr = new_cref;
10635 return;
10636 }
10637 new_cref = vm_cref_new_use_prev(CREF_CLASS(cref), METHOD_VISI_UNDEF, 0, cref, 0);
10638 cref = CREF_NEXT(cref);
10639 *new_cref_ptr = new_cref;
10640 new_cref_ptr = (rb_cref_t **)&new_cref->next;
10641 }
10642 *new_cref_ptr = ((void *)0);
10643}
10644static rb_cref_t *
10645vm_cref_push(const rb_execution_context_t *ec, VALUE klass, const VALUE *ep, int pushed_by_eval)
10646{
10647 rb_cref_t *prev_cref = ((void *)0);
10648 if (ep) {
10649 prev_cref = vm_env_cref(ep);
10650 }
10651 else {
10652 rb_control_frame_t *cfp = vm_get_ruby_level_caller_cfp(ec, ec->cfp);
10653 if (cfp) {
10654 prev_cref = vm_env_cref(cfp->ep);
10655 }
10656 }
10657 return vm_cref_new(klass, METHOD_VISI_PUBLIC, 0, prev_cref, pushed_by_eval);
10658}
10659static inline VALUE
10660vm_get_cbase(const VALUE *ep)
10661{
10662 const rb_cref_t *cref = rb_vm_get_cref(ep);
10663 VALUE klass = ((VALUE)RUBY_Qundef);
10664 while (cref) {
10665 if ((klass = CREF_CLASS(cref)) != 0) {
10666 break;
10667 }
10668 cref = CREF_NEXT(cref);
10669 }
10670 return klass;
10671}
10672static inline VALUE
10673vm_get_const_base(const VALUE *ep)
10674{
10675 const rb_cref_t *cref = rb_vm_get_cref(ep);
10676 VALUE klass = ((VALUE)RUBY_Qundef);
10677 while (cref) {
10678 if (!CREF_PUSHED_BY_EVAL(cref) &&
10679 (klass = CREF_CLASS(cref)) != 0) {
10680 break;
10681 }
10682 cref = CREF_NEXT(cref);
10683 }
10684 return klass;
10685}
10686static inline void
10687vm_check_if_namespace(VALUE klass)
10688{
10689 if (!( ((RUBY_T_CLASS) == RUBY_T_FIXNUM) ? (((int)(long)(klass))&RUBY_FIXNUM_FLAG) : ((RUBY_T_CLASS) == RUBY_T_TRUE) ? ((klass) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_CLASS) == RUBY_T_FALSE) ? ((klass) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_CLASS) == RUBY_T_NIL) ? ((klass) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_CLASS) == RUBY_T_UNDEF) ? ((klass) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_CLASS) == RUBY_T_SYMBOL) ? ((((VALUE)(klass)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(klass) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(klass) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(klass))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_CLASS) == RUBY_T_FLOAT) ? ( ((((int)(long)(klass))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(klass) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(klass) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(klass))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(klass) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(klass) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(klass))->flags & RUBY_T_MASK) == (RUBY_T_CLASS))) && !( ((RUBY_T_MODULE) == RUBY_T_FIXNUM) ? (((int)(long)(klass))&RUBY_FIXNUM_FLAG) : ((RUBY_T_MODULE) == RUBY_T_TRUE) ? ((klass) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_MODULE) == RUBY_T_FALSE) ? ((klass) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_MODULE) == RUBY_T_NIL) ? ((klass) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_MODULE) == RUBY_T_UNDEF) ? ((klass) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_MODULE) == RUBY_T_SYMBOL) ? ((((VALUE)(klass)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(klass) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(klass) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(klass))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_MODULE) == RUBY_T_FLOAT) ? ( ((((int)(long)(klass))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(klass) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(klass) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(klass))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(klass) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(klass) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(klass))->flags & RUBY_T_MASK) == (RUBY_T_MODULE)))) {
10690 rb_raise(rb_eTypeError, "%+""l""i" "\v"" is not a class/module", klass);
10691 }
10692}
10693static inline void
10694vm_ensure_not_refinement_module(VALUE self)
10695{
10696 if (( ((RUBY_T_MODULE) == RUBY_T_FIXNUM) ? (((int)(long)(self))&RUBY_FIXNUM_FLAG) : ((RUBY_T_MODULE) == RUBY_T_TRUE) ? ((self) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_MODULE) == RUBY_T_FALSE) ? ((self) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_MODULE) == RUBY_T_NIL) ? ((self) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_MODULE) == RUBY_T_UNDEF) ? ((self) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_MODULE) == RUBY_T_SYMBOL) ? ((((VALUE)(self)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(self) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(self) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(self))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_MODULE) == RUBY_T_FLOAT) ? ( ((((int)(long)(self))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(self) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(self) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(self))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(self) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(self) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(self))->flags & RUBY_T_MASK) == (RUBY_T_MODULE))) && ((!(((VALUE)(self) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(self) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(self))->flags & RUBY_T_MASK) != RUBY_T_NODE)?(((struct RBasic*)((self)))->flags&((RMODULE_IS_REFINEMENT))):0)) {
10697 rb_warn("not defined at the refinement, but at the outer class/module");
10698 }
10699}
10700static inline VALUE
10701vm_get_iclass(rb_control_frame_t *cfp, VALUE klass)
10702{
10703 return klass;
10704}
10705static inline VALUE
10706vm_get_ev_const(rb_execution_context_t *ec, VALUE orig_klass, ID id, int is_defined)
10707{
10708 void rb_const_warn_if_deprecated(const rb_const_entry_t *ce, VALUE klass, ID id);
10709 VALUE val;
10710 if (orig_klass == ((VALUE)RUBY_Qnil)) {
10711 const rb_cref_t *root_cref = rb_vm_get_cref(ec->cfp->ep);
10712 const rb_cref_t *cref;
10713 VALUE klass = ((VALUE)RUBY_Qnil);
10714 while (root_cref && CREF_PUSHED_BY_EVAL(root_cref)) {
10715 root_cref = CREF_NEXT(root_cref);
10716 }
10717 cref = root_cref;
10718 while (cref && CREF_NEXT(cref)) {
10719 if (CREF_PUSHED_BY_EVAL(cref)) {
10720 klass = ((VALUE)RUBY_Qnil);
10721 }
10722 else {
10723 klass = CREF_CLASS(cref);
10724 }
10725 cref = CREF_NEXT(cref);
10726 if (!!((VALUE)(klass) != ((VALUE)RUBY_Qnil))) {
10727 VALUE av, am = 0;
10728 rb_const_entry_t *ce;
10729 search_continue:
10730 if ((ce = rb_const_lookup(klass, id))) {
10731 rb_const_warn_if_deprecated(ce, klass, id);
10732 val = ce->value;
10733 if (val == ((VALUE)RUBY_Qundef)) {
10734 if (am == klass) break;
10735 am = klass;
10736 if (is_defined) return 1;
10737 if (rb_autoloading_value(klass, id, &av, ((void *)0))) return av;
10738 rb_autoload_load(klass, id);
10739 goto search_continue;
10740 }
10741 else {
10742 if (is_defined) {
10743 return 1;
10744 }
10745 else {
10746 return val;
10747 }
10748 }
10749 }
10750 }
10751 }
10752 if (root_cref && !!((VALUE)(CREF_CLASS(root_cref)) != ((VALUE)RUBY_Qnil))) {
10753 klass = vm_get_iclass(ec->cfp, CREF_CLASS(root_cref));
10754 }
10755 else {
10756 klass = rb_class_of((VALUE)(ec->cfp->self));
10757 }
10758 if (is_defined) {
10759 return rb_const_defined(klass, id);
10760 }
10761 else {
10762 return rb_const_get(klass, id);
10763 }
10764 }
10765 else {
10766 vm_check_if_namespace(orig_klass);
10767 if (is_defined) {
10768 return rb_public_const_defined_from(orig_klass, id);
10769 }
10770 else {
10771 return rb_public_const_get_from(orig_klass, id);
10772 }
10773 }
10774}
10775static inline VALUE
10776vm_get_cvar_base(const rb_cref_t *cref, rb_control_frame_t *cfp)
10777{
10778 VALUE klass;
10779 if (!cref) {
10780 rb_bug("vm_get_cvar_base: no cref");
10781 }
10782 while (CREF_NEXT(cref) &&
10783 (!((VALUE)(CREF_CLASS(cref)) != ((VALUE)RUBY_Qnil)) || ((!(((VALUE)(CREF_CLASS(cref)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(CREF_CLASS(cref)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(CREF_CLASS(cref)))->flags & RUBY_T_MASK) != RUBY_T_NODE)?(((struct RBasic*)((CREF_CLASS(cref))))->flags&((((VALUE)RUBY_FL_SINGLETON)))):0) ||
10784 CREF_PUSHED_BY_EVAL(cref))) {
10785 cref = CREF_NEXT(cref);
10786 }
10787 if (!CREF_NEXT(cref)) {
10788 rb_warn("class variable access from toplevel");
10789 }
10790 klass = vm_get_iclass(cfp, CREF_CLASS(cref));
10791 if (!((VALUE)(klass) != ((VALUE)RUBY_Qnil))) {
10792 rb_raise(rb_eTypeError, "no class variables available");
10793 }
10794 return klass;
10795}
10796static VALUE
10797vm_search_const_defined_class(const VALUE cbase, ID id)
10798{
10799 if (rb_const_defined_at(cbase, id)) return cbase;
10800 if (cbase == rb_cObject) {
10801 VALUE tmp = RCLASS_SUPER(cbase);
10802 while (tmp) {
10803 if (rb_const_defined_at(tmp, id)) return tmp;
10804 tmp = RCLASS_SUPER(tmp);
10805 }
10806 }
10807 return 0;
10808}
10809__attribute__ ((__always_inline__)) static VALUE vm_getivar(VALUE, ID, IC, struct rb_call_cache *, int);
10810static inline VALUE
10811vm_getivar(VALUE obj, ID id, IC ic, struct rb_call_cache *cc, int is_attr)
10812{
10813 if ((__builtin_expect(!!(( ((RUBY_T_OBJECT) == RUBY_T_FIXNUM) ? (((int)(long)(obj))&RUBY_FIXNUM_FLAG) : ((RUBY_T_OBJECT) == RUBY_T_TRUE) ? ((obj) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_OBJECT) == RUBY_T_FALSE) ? ((obj) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_OBJECT) == RUBY_T_NIL) ? ((obj) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_OBJECT) == RUBY_T_UNDEF) ? ((obj) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_OBJECT) == RUBY_T_SYMBOL) ? ((((VALUE)(obj)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(obj))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_OBJECT) == RUBY_T_FLOAT) ? ( ((((int)(long)(obj))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(obj))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(obj))->flags & RUBY_T_MASK) == (RUBY_T_OBJECT)))), 1))) {
10814 VALUE val = ((VALUE)RUBY_Qundef);
10815 if ((__builtin_expect(!!(is_attr ? (cc->aux.index > 0) : (ic->ic_serial == ((((struct RClass*)(((struct RBasic*)(obj))->klass))->ptr)->class_serial))), 1))) {
10816 st_index_t index = !is_attr ? ic->ic_value.index : (cc->aux.index - 1);
10817 if ((__builtin_expect(!!(index < ((((struct RBasic*)(obj))->flags & ROBJECT_EMBED) ? ROBJECT_EMBED_LEN_MAX : ((struct RObject*)(obj))->as.heap.numiv)), 1))) {
10818 val = ((((struct RBasic*)(obj))->flags & ROBJECT_EMBED) ? ((struct RObject*)(obj))->as.ary : ((struct RObject*)(obj))->as.heap.ivptr)[index];
10819 }
10820 }
10821 else {
10822 st_data_t index;
10823 struct st_table *iv_index_tbl = ((((struct RBasic*)(obj))->flags & ROBJECT_EMBED) ? ((((struct RClass*)(rb_obj_class(obj)))->ptr)->iv_index_tbl) : ((struct RObject*)(obj))->as.heap.iv_index_tbl);
10824 if (iv_index_tbl) {
10825 if (st_lookup(iv_index_tbl, id, &index)) {
10826 if (index < ((((struct RBasic*)(obj))->flags & ROBJECT_EMBED) ? ROBJECT_EMBED_LEN_MAX : ((struct RObject*)(obj))->as.heap.numiv)) {
10827 val = ((((struct RBasic*)(obj))->flags & ROBJECT_EMBED) ? ((struct RObject*)(obj))->as.ary : ((struct RObject*)(obj))->as.heap.ivptr)[index];
10828 }
10829 if (!is_attr) {
10830 ic->ic_value.index = index;
10831 ic->ic_serial = ((((struct RClass*)(((struct RBasic*)(obj))->klass))->ptr)->class_serial);
10832 }
10833 else {
10834 cc->aux.index = (int)index + 1;
10835 }
10836 }
10837 }
10838 }
10839 if ((__builtin_expect(!!(val == ((VALUE)RUBY_Qundef)), 0))) {
10840 if (!is_attr && !(((VALUE)((*rb_ruby_verbose_ptr())) & (VALUE)~((VALUE)RUBY_Qnil)) == 0))
10841 rb_warning("instance variable %""l""i" "\v"" not initialized", rb_id_quote_unprintable(id));
10842 val = ((VALUE)RUBY_Qnil);
10843 }
10844 ((void)0);
10845 return val;
10846 }
10847 else {
10848 ((void)0);
10849 }
10850 ((void)0);
10851 if (is_attr)
10852 return rb_attr_get(obj, id);
10853 return rb_ivar_get(obj, id);
10854}
10855ALWAYS_INLINE(static inline VALUE
10856vm_setivar(VALUE obj, ID id, VALUE val, IC ic, struct rb_call_cache *cc, int is_attr));
10857static inline VALUE
10858vm_setivar(VALUE obj, ID id, VALUE val, IC ic, struct rb_call_cache *cc, int is_attr) {
10859 do { VALUE frozen_obj = (obj); if ((__builtin_expect(!!((!(!(((VALUE)(frozen_obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(frozen_obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(frozen_obj))->flags & RUBY_T_MASK) != RUBY_T_NODE) || (((struct RBasic*)(frozen_obj))->flags&RUBY_FL_FREEZE))), 0))) { rb_error_frozen_object(frozen_obj); } } while (0);
10860 if ((__builtin_expect(!!(( ((RUBY_T_OBJECT) == RUBY_T_FIXNUM) ? (((int)(long)(obj))&RUBY_FIXNUM_FLAG) : ((RUBY_T_OBJECT) == RUBY_T_TRUE) ? ((obj) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_OBJECT) == RUBY_T_FALSE) ? ((obj) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_OBJECT) == RUBY_T_NIL) ? ((obj) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_OBJECT) == RUBY_T_UNDEF) ? ((obj) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_OBJECT) == RUBY_T_SYMBOL) ? ((((VALUE)(obj)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(obj))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_OBJECT) == RUBY_T_FLOAT) ? ( ((((int)(long)(obj))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(obj))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(obj))->flags & RUBY_T_MASK) == (RUBY_T_OBJECT)))), 1))) {
10861 VALUE klass = ((struct RBasic*)(obj))->klass;
10862 st_data_t index;
10863 if ((__builtin_expect(!!((!is_attr && (ic->ic_serial == ((((struct RClass*)(klass))->ptr)->class_serial))) || ( is_attr && (cc->aux.index > 0))), 1))) {
10864 VALUE *ptr = ((((struct RBasic*)(obj))->flags & ROBJECT_EMBED) ? ((struct RObject*)(obj))->as.ary : ((struct RObject*)(obj))->as.heap.ivptr);
10865 index = !is_attr ? ic->ic_value.index : cc->aux.index-1;
10866 if ((index < ((((struct RBasic*)(obj))->flags & ROBJECT_EMBED) ? ROBJECT_EMBED_LEN_MAX : ((struct RObject*)(obj))->as.heap.numiv))) {
10867 rb_obj_write((VALUE)(obj), (VALUE *)(&ptr[index]), (VALUE)(val), "./vm_insnhelper.c", 1025);
10868 ((void)0);
10869 return val;
10870 }
10871 }
10872 else {
10873 struct st_table *iv_index_tbl = ((((struct RBasic*)(obj))->flags & ROBJECT_EMBED) ? ((((struct RClass*)(rb_obj_class(obj)))->ptr)->iv_index_tbl) : ((struct RObject*)(obj))->as.heap.iv_index_tbl);
10874 if (iv_index_tbl && st_lookup(iv_index_tbl, (st_data_t)id, &index)) {
10875 if (!is_attr) {
10876 ic->ic_value.index = index;
10877 ic->ic_serial = ((((struct RClass*)(klass))->ptr)->class_serial);
10878 }
10879 else if (index >= 0x7fffffff) {
10880 rb_raise(rb_eArgError, "too many instance variables");
10881 }
10882 else {
10883 cc->aux.index = (int)(index + 1);
10884 }
10885 }
10886 }
10887 }
10888 else {
10889 ((void)0);
10890 }
10891 ((void)0);
10892 return rb_ivar_set(obj, id, val);
10893}
10894ALWAYS_INLINE(static inline VALUE
10895vm_getinstancevariable(VALUE obj, ID id, IC ic));
10896static inline VALUE
10897vm_getinstancevariable(VALUE obj, ID id, IC ic) {
10898 return vm_getivar(obj, id, ic, ((void *)0), 0);
10899}
10900ALWAYS_INLINE(static inline void
10901vm_setinstancevariable(VALUE obj, ID id, VALUE val, IC ic));
10902static inline void
10903vm_setinstancevariable(VALUE obj, ID id, VALUE val, IC ic) {
10904 vm_setivar(obj, id, val, ic, 0, 0);
10905}
10906static VALUE
10907vm_throw_continue(const rb_execution_context_t *ec, VALUE err)
10908{
10909 if ((((int)(long)(err))&RUBY_FIXNUM_FLAG)) {
10910 ec->tag->state = ((int)rb_fix2int((VALUE)(err)));
10911 }
10912 else if (((((VALUE)(err)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(err) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(err) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(err))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL)))) {
10913 ec->tag->state = RUBY_TAG_THROW;
10914 }
10915 else if (( ((RUBY_T_IMEMO) == RUBY_T_FIXNUM) ? (((int)(long)((VALUE)(err)))&RUBY_FIXNUM_FLAG) : ((RUBY_T_IMEMO) == RUBY_T_TRUE) ? (((VALUE)(err)) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_IMEMO) == RUBY_T_FALSE) ? (((VALUE)(err)) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_IMEMO) == RUBY_T_NIL) ? (((VALUE)(err)) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_IMEMO) == RUBY_T_UNDEF) ? (((VALUE)(err)) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_IMEMO) == RUBY_T_SYMBOL) ? ((((VALUE)((VALUE)(err))&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)((VALUE)(err)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((VALUE)(err)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((VALUE)(err)))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_IMEMO) == RUBY_T_FLOAT) ? ( ((((int)(long)((VALUE)(err)))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)((VALUE)(err)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((VALUE)(err)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((VALUE)(err)))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)((VALUE)(err)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((VALUE)(err)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((VALUE)(err)))->flags & RUBY_T_MASK) == (RUBY_T_IMEMO)))) {
10916 ec->tag->state = THROW_DATA_STATE((struct vm_throw_data *)err);
10917 }
10918 else {
10919 ec->tag->state = RUBY_TAG_RAISE;
10920 }
10921 return err;
10922}
10923static VALUE
10924vm_throw_start(const rb_execution_context_t *ec, rb_control_frame_t *const reg_cfp, enum ruby_tag_type state,
10925 const int flag, const VALUE throwobj)
10926{
10927 const rb_control_frame_t *escape_cfp = ((void *)0);
10928 const rb_control_frame_t * const eocfp = RUBY_VM_END_CONTROL_FRAME(ec);
10929 if (flag != 0) {
10930 }
10931 else if (state == RUBY_TAG_BREAK) {
10932 int is_orphan = 1;
10933 const VALUE *ep = ((((reg_cfp)->ep)));
10934 const rb_iseq_t *base_iseq = ((((reg_cfp)))->iseq);
10935 escape_cfp = reg_cfp;
10936 while (base_iseq->body->type != ISEQ_TYPE_BLOCK) {
10937 if (escape_cfp->iseq->body->type == ISEQ_TYPE_CLASS) {
10938 escape_cfp = ((escape_cfp)+1);
10939 ep = escape_cfp->ep;
10940 base_iseq = escape_cfp->iseq;
10941 }
10942 else {
10943 ep = VM_ENV_PREV_EP(ep);
10944 base_iseq = base_iseq->body->parent_iseq;
10945 escape_cfp = rb_vm_search_cf_from_ep(ec, escape_cfp, ep);
10946 ((void)0);
10947 }
10948 }
10949 if (VM_FRAME_LAMBDA_P(escape_cfp)) {
10950 is_orphan = 0;
10951 state = RUBY_TAG_RETURN;
10952 }
10953 else {
10954 ep = VM_ENV_PREV_EP(ep);
10955 while (escape_cfp < eocfp) {
10956 if (escape_cfp->ep == ep) {
10957 const rb_iseq_t *const iseq = escape_cfp->iseq;
10958 const VALUE epc = escape_cfp->pc - iseq->body->iseq_encoded;
10959 const struct iseq_catch_table *const ct = iseq->body->catch_table;
10960 unsigned int i;
10961 if (!ct) break;
10962 for (i=0; i < ct->size; i++) {
10963 const struct iseq_catch_table_entry * const entry = &ct->entries[i];
10964 if (entry->type == CATCH_TYPE_BREAK &&
10965 entry->iseq == base_iseq &&
10966 entry->start < epc && entry->end >= epc) {
10967 if (entry->cont == epc) {
10968 is_orphan = 0;
10969 }
10970 break;
10971 }
10972 }
10973 break;
10974 }
10975 escape_cfp = ((escape_cfp)+1);
10976 }
10977 }
10978 if (is_orphan) {
10979 rb_vm_localjump_error("break from proc-closure", throwobj, RUBY_TAG_BREAK);
10980 }
10981 }
10982 else if (state == RUBY_TAG_RETRY) {
10983 const VALUE *ep = VM_ENV_PREV_EP(((((reg_cfp)->ep))));
10984 escape_cfp = rb_vm_search_cf_from_ep(ec, reg_cfp, ep);
10985 }
10986 else if (state == RUBY_TAG_RETURN) {
10987 const VALUE *current_ep = ((((reg_cfp)->ep)));
10988 const VALUE *target_lep = VM_EP_LEP(current_ep);
10989 int in_class_frame = 0;
10990 int toplevel = 1;
10991 escape_cfp = reg_cfp;
10992 while (escape_cfp < eocfp) {
10993 const VALUE *lep = VM_CF_LEP(escape_cfp);
10994 if (!target_lep) {
10995 target_lep = lep;
10996 }
10997 if (lep == target_lep &&
10998 VM_FRAME_RUBYFRAME_P(escape_cfp) &&
10999 escape_cfp->iseq->body->type == ISEQ_TYPE_CLASS) {
11000 in_class_frame = 1;
11001 target_lep = 0;
11002 }
11003 if (lep == target_lep) {
11004 if (VM_FRAME_LAMBDA_P(escape_cfp)) {
11005 toplevel = 0;
11006 if (in_class_frame) {
11007 goto valid_return;
11008 }
11009 else {
11010 const VALUE *tep = current_ep;
11011 while (target_lep != tep) {
11012 if (escape_cfp->ep == tep) {
11013 goto valid_return;
11014 }
11015 tep = VM_ENV_PREV_EP(tep);
11016 }
11017 }
11018 }
11019 else if (VM_FRAME_RUBYFRAME_P(escape_cfp)) {
11020 switch (escape_cfp->iseq->body->type) {
11021 case ISEQ_TYPE_TOP:
11022 case ISEQ_TYPE_MAIN:
11023 if (toplevel) goto valid_return;
11024 break;
11025 case ISEQ_TYPE_EVAL:
11026 case ISEQ_TYPE_CLASS:
11027 toplevel = 0;
11028 break;
11029 default:
11030 break;
11031 }
11032 }
11033 }
11034 if (escape_cfp->ep == target_lep && escape_cfp->iseq->body->type == ISEQ_TYPE_METHOD) {
11035 goto valid_return;
11036 }
11037 escape_cfp = ((escape_cfp)+1);
11038 }
11039 rb_vm_localjump_error("unexpected return", throwobj, RUBY_TAG_RETURN);
11040 valid_return:;
11041 }
11042 else {
11043 rb_bug("isns(throw): unsupport throw type");
11044 }
11045 ec->tag->state = state;
11046 return (VALUE)THROW_DATA_NEW(throwobj, escape_cfp, state);
11047}
11048static VALUE
11049vm_throw(const rb_execution_context_t *ec, rb_control_frame_t *reg_cfp,
11050 rb_num_t throw_state, VALUE throwobj)
11051{
11052 const int state = (int)(throw_state & VM_THROW_STATE_MASK);
11053 const int flag = (int)(throw_state & VM_THROW_NO_ESCAPE_FLAG);
11054 if (state != 0) {
11055 return vm_throw_start(ec, reg_cfp, state, flag, throwobj);
11056 }
11057 else {
11058 return vm_throw_continue(ec, throwobj);
11059 }
11060}
11061static inline void
11062vm_expandarray(VALUE *sp, VALUE ary, rb_num_t num, int flag)
11063{
11064 int is_splat = flag & 0x01;
11065 rb_num_t space_size = num + is_splat;
11066 VALUE *base = sp - 1;
11067 const VALUE *ptr;
11068 rb_num_t len;
11069 const VALUE obj = ary;
11070 if (!( ((RUBY_T_ARRAY) == RUBY_T_FIXNUM) ? (((int)(long)(ary))&RUBY_FIXNUM_FLAG) : ((RUBY_T_ARRAY) == RUBY_T_TRUE) ? ((ary) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_ARRAY) == RUBY_T_FALSE) ? ((ary) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_ARRAY) == RUBY_T_NIL) ? ((ary) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_ARRAY) == RUBY_T_UNDEF) ? ((ary) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_ARRAY) == RUBY_T_SYMBOL) ? ((((VALUE)(ary)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(ary) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(ary) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(ary))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_ARRAY) == RUBY_T_FLOAT) ? ( ((((int)(long)(ary))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(ary) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(ary) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(ary))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(ary) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(ary) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(ary))->flags & RUBY_T_MASK) == (RUBY_T_ARRAY))) && !((VALUE)(ary = rb_check_array_type(ary)) != ((VALUE)RUBY_Qnil))) {
11071 ary = obj;
11072 ptr = &ary;
11073 len = 1;
11074 }
11075 else {
11076 ptr = rb_array_const_ptr_transient(ary);
11077 len = (rb_num_t)rb_array_len(ary);
11078 }
11079 if (space_size == 0) {
11080 }
11081 else if (flag & 0x02) {
11082 rb_num_t i = 0, j;
11083 if (len < num) {
11084 for (i=0; i<num-len; i++) {
11085 *base++ = ((VALUE)RUBY_Qnil);
11086 }
11087 }
11088 for (j=0; i<num; i++, j++) {
11089 VALUE v = ptr[len - j - 1];
11090 *base++ = v;
11091 }
11092 if (is_splat) {
11093 *base = rb_ary_new_from_values(len - j, ptr);
11094 }
11095 }
11096 else {
11097 rb_num_t i;
11098 VALUE *bptr = &base[space_size - 1];
11099 for (i=0; i<num; i++) {
11100 if (len <= i) {
11101 for (; i<num; i++) {
11102 *bptr-- = ((VALUE)RUBY_Qnil);
11103 }
11104 break;
11105 }
11106 *bptr-- = ptr[i];
11107 }
11108 if (is_splat) {
11109 if (num > len) {
11110 *bptr = rb_ary_new();
11111 }
11112 else {
11113 *bptr = rb_ary_new_from_values(len - num, ptr + num);
11114 }
11115 }
11116 }
11117 (*__extension__ ({ volatile VALUE *rb_gc_guarded_ptr = &(ary); __asm__("" : : "m"(rb_gc_guarded_ptr)); rb_gc_guarded_ptr; }));
11118}
11119static VALUE vm_call_general(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc);
11120__attribute__ ((__visibility__("default"))) extern void
11121rb_vm_search_method_slowpath(const struct rb_call_info *ci, struct rb_call_cache *cc, VALUE klass)
11122;
11123static void
11124vm_search_method(const struct rb_call_info *ci, struct rb_call_cache *cc, VALUE recv)
11125{
11126 VALUE klass = rb_class_of((VALUE)(recv));
11127 ((void)0);
11128 ((void)0);
11129 if ((__builtin_expect(!!(((ruby_vm_global_method_state) == cc->method_state) && (((((struct RClass*)(klass))->ptr)->class_serial) == cc->class_serial)), 1))) {
11130 ((void)0);
11131 ((void)0);
11132 return;
11133 }
11134 ((void)0);
11135 rb_vm_search_method_slowpath(ci, cc, klass);
11136}
11137static inline int
11138check_cfunc(const rb_callable_method_entry_t *me, VALUE (*func)())
11139{
11140 if (me && me->def->type == VM_METHOD_TYPE_CFUNC &&
11141 me->def->body.cfunc.func == func) {
11142 return 1;
11143 }
11144 else {
11145 return 0;
11146 }
11147}
11148static inline int
11149vm_method_cfunc_is(CALL_INFO ci, CALL_CACHE cc,
11150 VALUE recv, VALUE (*func)())
11151{
11152 vm_search_method(ci, cc, recv);
11153 return check_cfunc(cc->me, func);
11154}
11155static VALUE
11156opt_equal_fallback(VALUE recv, VALUE obj, CALL_INFO ci, CALL_CACHE cc)
11157{
11158 if (vm_method_cfunc_is(ci, cc, recv, rb_obj_equal)) {
11159 return recv == obj ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
11160 }
11161 return ((VALUE)RUBY_Qundef);
11162}
11163static inline int
11164comparable_by_identity(VALUE recv, VALUE obj)
11165{
11166 if (((recv) & (obj) & 1)) {
11167 return (((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_EQ)]&((1 << 0))) == 0), 1))) != 0) * 2 - 1;
11168 }
11169 if ((((((recv)^2) | ((obj)^2)) & 3) == 0)) {
11170 return (((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_EQ)]&((1 << 1))) == 0), 1))) != 0) * 2 - 1;
11171 }
11172 if (((((VALUE)(recv)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(recv))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) && ((((VALUE)(obj)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(obj))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL)))) {
11173 return (((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_EQ)]&((1 << 6))) == 0), 1))) != 0) * 2 - 1;
11174 }
11175 return 0;
11176}
11177static
11178inline
11179VALUE
11180opt_eq_func(VALUE recv, VALUE obj, CALL_INFO ci, CALL_CACHE cc)
11181{
11182 switch (comparable_by_identity(recv, obj)) {
11183 case 1:
11184 return (recv == obj) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
11185 case -1:
11186 goto fallback;
11187 }
11188 if (0) {
11189 }
11190 else if ((!(((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (((struct RBasic*)(recv))->klass) == rb_cFloat)) {
11191 if (((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_EQ)]&((1 << 1))) == 0), 1)))) {
11192 return rb_float_equal(recv, obj);
11193 }
11194 }
11195 else if ((!(((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (((struct RBasic*)(recv))->klass) == rb_cString)) {
11196 if (((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_EQ)]&((1 << 2))) == 0), 1)))) {
11197 return rb_str_equal(recv, obj);
11198 }
11199 }
11200 fallback:
11201 return opt_equal_fallback(recv, obj, ci, cc);
11202}
11203static
11204inline
11205VALUE
11206opt_eql_func(VALUE recv, VALUE obj, CALL_INFO ci, CALL_CACHE cc)
11207{
11208 switch (comparable_by_identity(recv, obj)) {
11209 case 1:
11210 return (recv == obj) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
11211 case -1:
11212 goto fallback;
11213 }
11214 if (0) {
11215 }
11216 else if ((!(((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (((struct RBasic*)(recv))->klass) == rb_cFloat)) {
11217 if (((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_EQ)]&((1 << 1))) == 0), 1)))) {
11218 return rb_float_eql(recv, obj);
11219 }
11220 }
11221 else if ((!(((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (((struct RBasic*)(recv))->klass) == rb_cString)) {
11222 if (((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_EQ)]&((1 << 2))) == 0), 1)))) {
11223 return rb_str_eql(recv, obj);
11224 }
11225 }
11226 fallback:
11227 return opt_equal_fallback(recv, obj, ci, cc);
11228}
11229VALUE
11230rb_equal_opt(VALUE obj1, VALUE obj2)
11231;static inline
11232VALUE
11233rb_eql_opt(VALUE obj1, VALUE obj2)
11234{
11235 struct rb_call_info ci;
11236 struct rb_call_cache cc;
11237 ci.mid = idEqlP;
11238 cc.method_state = 0;
11239 cc.class_serial = 0;
11240 cc.me = ((void *)0);
11241 return opt_eql_func(obj1, obj2, &ci, &cc);
11242}
11243extern VALUE rb_vm_call0(rb_execution_context_t *ec, VALUE, ID, int, const VALUE*, const rb_callable_method_entry_t *);
11244static VALUE
11245check_match(rb_execution_context_t *ec, VALUE pattern, VALUE target, enum vm_check_match_type type)
11246{
11247 switch (type) {
11248 case VM_CHECKMATCH_TYPE_WHEN:
11249 return pattern;
11250 case VM_CHECKMATCH_TYPE_RESCUE:
11251 if (!rb_obj_is_kind_of(pattern, rb_cModule)) {
11252 rb_raise(rb_eTypeError, "class or module required for rescue clause");
11253 }
11254 case VM_CHECKMATCH_TYPE_CASE: {
11255 const rb_callable_method_entry_t *me =
11256 rb_callable_method_entry_with_refinements(rb_class_of((VALUE)(pattern)), idEqq, ((void *)0));
11257 if (me) {
11258 return rb_vm_call0(ec, pattern, idEqq, 1, &target, me);
11259 }
11260 else {
11261 return rb_funcallv(pattern, idEqq, 1, &target);
11262 }
11263 }
11264 default:
11265 rb_bug("check_match: unreachable");
11266 }
11267}
11268static inline VALUE
11269double_cmp_lt(double a, double b)
11270{
11271 ;
11272 return a < b ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
11273}
11274static inline VALUE
11275double_cmp_le(double a, double b)
11276{
11277 ;
11278 return a <= b ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
11279}
11280static inline VALUE
11281double_cmp_gt(double a, double b)
11282{
11283 ;
11284 return a > b ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
11285}
11286static inline VALUE
11287double_cmp_ge(double a, double b)
11288{
11289 ;
11290 return a >= b ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
11291}
11292static VALUE *
11293vm_base_ptr(const rb_control_frame_t *cfp)
11294{
11295 const rb_control_frame_t *prev_cfp = ((cfp)+1);
11296 if (cfp->iseq && VM_FRAME_RUBYFRAME_P(cfp)) {
11297 VALUE *bp = prev_cfp->sp + cfp->iseq->body->local_table_size + ( 3);
11298 if (cfp->iseq->body->type == ISEQ_TYPE_METHOD) {
11299 bp += 1;
11300 }
11301 return bp;
11302 }
11303 else {
11304 return ((void *)0);
11305 }
11306}
11307__attribute__ ((__noreturn__)) static void raise_argument_error(rb_execution_context_t *ec, const rb_iseq_t *iseq, const VALUE exc);
11308__attribute__ ((__noreturn__)) static void argument_arity_error(rb_execution_context_t *ec, const rb_iseq_t *iseq, const int miss_argc, const int min_argc, const int max_argc);
11309__attribute__ ((__noreturn__)) static void argument_kw_error(rb_execution_context_t *ec, const rb_iseq_t *iseq, const char *error, const VALUE keys);
11310VALUE rb_keyword_error_new(const char *error, VALUE keys);
11311static VALUE method_missing(VALUE obj, ID id, int argc, const VALUE *argv,
11312 enum method_missing_reason call_status);
11314 VALUE *argv;
11315 int argc;
11316 int rest_index;
11317 int rest_dupped;
11318 const struct rb_call_info_kw_arg *kw_arg;
11319 VALUE *kw_argv;
11320 VALUE rest;
11321};
11322enum arg_setup_type {
11323 arg_setup_method,
11324 arg_setup_block
11325};
11326static inline void
11327arg_rest_dup(struct args_info *args)
11328{
11329 if(!args->rest_dupped) {
11330 args->rest = rb_ary_dup(args->rest);
11331 args->rest_dupped = 1;
11332 }
11333}
11334static inline int
11335args_argc(struct args_info *args)
11336{
11337 if (args->rest == ((VALUE)RUBY_Qfalse)) {
11338 return args->argc;
11339 }
11340 else {
11341 return args->argc + rb_long2int_inline(rb_array_len(args->rest)) - args->rest_index;
11342 }
11343}
11344static inline void
11345args_extend(struct args_info *args, const int min_argc)
11346{
11347 int i;
11348 if (args->rest) {
11349 arg_rest_dup(args);
11350 ((void)0);
11351 for (i=args->argc + rb_long2int_inline(rb_array_len(args->rest)); i<min_argc; i++) {
11352 rb_ary_push(args->rest, ((VALUE)RUBY_Qnil));
11353 }
11354 }
11355 else {
11356 for (i=args->argc; i<min_argc; i++) {
11357 args->argv[args->argc++] = ((VALUE)RUBY_Qnil);
11358 }
11359 }
11360}
11361static inline void
11362args_reduce(struct args_info *args, int over_argc)
11363{
11364 if (args->rest) {
11365 const long len = rb_array_len(args->rest);
11366 if (len > over_argc) {
11367 arg_rest_dup(args);
11368 rb_ary_resize(args->rest, len - over_argc);
11369 return;
11370 }
11371 else {
11372 args->rest = ((VALUE)RUBY_Qfalse);
11373 over_argc -= len;
11374 }
11375 }
11376 ((void)0);
11377 args->argc -= over_argc;
11378}
11379static inline int
11380args_check_block_arg0(struct args_info *args)
11381{
11382 VALUE ary = ((VALUE)RUBY_Qnil);
11383 if (args->rest && rb_array_len(args->rest) == 1) {
11384 VALUE arg0 = (rb_array_const_ptr_transient(args->rest)[0]);
11385 ary = rb_check_array_type(arg0);
11386 }
11387 else if (args->argc == 1) {
11388 VALUE arg0 = args->argv[0];
11389 ary = rb_check_array_type(arg0);
11390 args->argv[0] = arg0;
11391 }
11392 if (!!((VALUE)(ary) != ((VALUE)RUBY_Qnil))) {
11393 args->rest = ary;
11394 args->rest_index = 0;
11395 args->argc = 0;
11396 return 1;
11397 }
11398 return 0;
11399}
11400static inline void
11401args_copy(struct args_info *args)
11402{
11403 if (args->rest != ((VALUE)RUBY_Qfalse)) {
11404 int argc = args->argc;
11405 args->argc = 0;
11406 arg_rest_dup(args);
11407 while (args->rest_index > 0 && argc > 0) {
11408 do { const VALUE _ary = (args->rest); const VALUE _v = (args->argv[--argc]); VALUE *ptr = (VALUE *)rb_array_ptr_use_start(_ary, 1); rb_obj_write((VALUE)(_ary), (VALUE *)(&ptr[--args->rest_index]), (VALUE)(_v), "./vm_args.c", 150); rb_array_ptr_use_end(_ary, 1); } while (0);
11409 }
11410 while (argc > 0) {
11411 rb_ary_unshift(args->rest, args->argv[--argc]);
11412 }
11413 }
11414 else if (args->argc > 0) {
11415 args->rest = rb_ary_new_from_values(args->argc, args->argv);
11416 args->rest_index = 0;
11417 args->rest_dupped = 1;
11418 args->argc = 0;
11419 }
11420}
11421static inline const VALUE *
11422args_rest_argv(struct args_info *args)
11423{
11424 return rb_array_const_ptr_transient(args->rest) + args->rest_index;
11425}
11426static inline VALUE
11427args_rest_array(struct args_info *args)
11428{
11429 VALUE ary;
11430 if (args->rest) {
11431 ary = rb_ary_behead(args->rest, args->rest_index);
11432 args->rest_index = 0;
11433 args->rest = 0;
11434 }
11435 else {
11436 ary = rb_ary_new();
11437 }
11438 return ary;
11439}
11440static int
11441keyword_hash_p(VALUE *kw_hash_ptr, VALUE *rest_hash_ptr)
11442{
11443 *rest_hash_ptr = rb_check_hash_type(*kw_hash_ptr);
11444 if (!!((VALUE)(*rest_hash_ptr) != ((VALUE)RUBY_Qnil))) {
11445 VALUE hash = rb_extract_keywords(rest_hash_ptr);
11446 if (!hash) hash = ((VALUE)RUBY_Qnil);
11447 *kw_hash_ptr = hash;
11448 return 1;
11449 }
11450 else {
11451 *kw_hash_ptr = ((VALUE)RUBY_Qnil);
11452 return 0;
11453 }
11454}
11455static VALUE
11456args_pop_keyword_hash(struct args_info *args, VALUE *kw_hash_ptr)
11457{
11458 VALUE rest_hash;
11459 if (args->rest == ((VALUE)RUBY_Qfalse)) {
11460 from_argv:
11461 ((void)0);
11462 *kw_hash_ptr = args->argv[args->argc-1];
11463 if (keyword_hash_p(kw_hash_ptr, &rest_hash)) {
11464 if (rest_hash) {
11465 args->argv[args->argc-1] = rest_hash;
11466 }
11467 else {
11468 args->argc--;
11469 return 1;
11470 }
11471 }
11472 }
11473 else {
11474 long len = rb_array_len(args->rest);
11475 if (len > 0) {
11476 *kw_hash_ptr = (rb_array_const_ptr_transient(args->rest)[len - 1]);
11477 if (keyword_hash_p(kw_hash_ptr, &rest_hash)) {
11478 if (rest_hash) {
11479 do { const VALUE _ary = (args->rest); const VALUE _v = (rest_hash); VALUE *ptr = (VALUE *)rb_array_ptr_use_start(_ary, 1); rb_obj_write((VALUE)(_ary), (VALUE *)(&ptr[len - 1]), (VALUE)(_v), "./vm_args.c", 231); rb_array_ptr_use_end(_ary, 1); } while (0);
11480 }
11481 else {
11482 arg_rest_dup(args);
11483 rb_ary_pop(args->rest);
11484 return 1;
11485 }
11486 }
11487 }
11488 else {
11489 goto from_argv;
11490 }
11491 }
11492 return 0;
11493}
11494static int
11495args_kw_argv_to_hash(struct args_info *args)
11496{
11497 const struct rb_call_info_kw_arg *kw_arg = args->kw_arg;
11498 const VALUE *const passed_keywords = kw_arg->keywords;
11499 const int kw_len = kw_arg->keyword_len;
11500 VALUE h = rb_hash_new_with_size(kw_len);
11501 const int kw_start = args->argc - kw_len;
11502 const VALUE * const kw_argv = args->argv + kw_start;
11503 int i;
11504 args->argc = kw_start + 1;
11505 for (i=0; i<kw_len; i++) {
11506 rb_hash_aset(h, passed_keywords[i], kw_argv[i]);
11507 }
11508 args->argv[args->argc - 1] = h;
11509 return args->argc;
11510}
11511static void
11512args_stored_kw_argv_to_hash(struct args_info *args)
11513{
11514 int i;
11515 const struct rb_call_info_kw_arg *kw_arg = args->kw_arg;
11516 const VALUE *const passed_keywords = kw_arg->keywords;
11517 const int passed_keyword_len = kw_arg->keyword_len;
11518 VALUE h = rb_hash_new_with_size(passed_keyword_len);
11519 for (i=0; i<passed_keyword_len; i++) {
11520 rb_hash_aset(h, passed_keywords[i], args->kw_argv[i]);
11521 }
11522 args->kw_argv = ((void *)0);
11523 if (args->rest) {
11524 arg_rest_dup(args);
11525 rb_ary_push(args->rest, h);
11526 }
11527 else {
11528 args->argv[args->argc++] = h;
11529 }
11530}
11531static inline void
11532args_setup_lead_parameters(struct args_info *args, int argc, VALUE *locals)
11533{
11534 if (args->argc >= argc) {
11535 args->argc -= argc;
11536 args->argv += argc;
11537 }
11538 else {
11539 int i, j;
11540 const VALUE *argv = args_rest_argv(args);
11541 for (i=args->argc, j=0; i<argc; i++, j++) {
11542 locals[i] = argv[j];
11543 }
11544 args->rest_index += argc - args->argc;
11545 args->argc = 0;
11546 }
11547}
11548static inline void
11549args_setup_post_parameters(struct args_info *args, int argc, VALUE *locals)
11550{
11551 long len;
11552 len = rb_array_len(args->rest);
11553 memcpy((locals), (rb_array_const_ptr_transient(args->rest) + len - argc), sizeof(VALUE)*(size_t)(argc));
11554 rb_ary_resize(args->rest, len - argc);
11555}
11556static inline int
11557args_setup_opt_parameters(struct args_info *args, int opt_max, VALUE *locals)
11558{
11559 int i;
11560 if (args->argc >= opt_max) {
11561 args->argc -= opt_max;
11562 args->argv += opt_max;
11563 i = opt_max;
11564 }
11565 else {
11566 int j;
11567 i = args->argc;
11568 args->argc = 0;
11569 if (args->rest) {
11570 int len = rb_long2int_inline(rb_array_len(args->rest));
11571 const VALUE *argv = rb_array_const_ptr_transient(args->rest);
11572 for (; i<opt_max && args->rest_index < len; i++, args->rest_index++) {
11573 locals[i] = argv[args->rest_index];
11574 }
11575 }
11576 for (j=i; j<opt_max; j++) {
11577 locals[j] = ((VALUE)RUBY_Qnil);
11578 }
11579 }
11580 return i;
11581}
11582static inline void
11583args_setup_rest_parameter(struct args_info *args, VALUE *locals)
11584{
11585 *locals = args_rest_array(args);
11586}
11587static VALUE
11588make_unknown_kw_hash(const VALUE *passed_keywords, int passed_keyword_len, const VALUE *kw_argv)
11589{
11590 int i;
11591 VALUE obj = rb_ary_tmp_new(1);
11592 for (i=0; i<passed_keyword_len; i++) {
11593 if (kw_argv[i] != ((VALUE)RUBY_Qundef)) {
11594 rb_ary_push(obj, passed_keywords[i]);
11595 }
11596 }
11597 return obj;
11598}
11599static VALUE
11600make_rest_kw_hash(const VALUE *passed_keywords, int passed_keyword_len, const VALUE *kw_argv)
11601{
11602 int i;
11603 VALUE obj = rb_hash_new_with_size(passed_keyword_len);
11604 for (i=0; i<passed_keyword_len; i++) {
11605 if (kw_argv[i] != ((VALUE)RUBY_Qundef)) {
11606 rb_hash_aset(obj, passed_keywords[i], kw_argv[i]);
11607 }
11608 }
11609 return obj;
11610}
11611static inline int
11612args_setup_kw_parameters_lookup(const ID key, VALUE *ptr, const VALUE *const passed_keywords, VALUE *passed_values, const int passed_keyword_len)
11613{
11614 int i;
11615 const VALUE keyname = (rb_id2sym(key));
11616 for (i=0; i<passed_keyword_len; i++) {
11617 if (keyname == passed_keywords[i]) {
11618 *ptr = passed_values[i];
11619 passed_values[i] = ((VALUE)RUBY_Qundef);
11620 return 1;
11621 }
11622 }
11623 return 0;
11624}
11625static void
11626args_setup_kw_parameters(rb_execution_context_t *const ec, const rb_iseq_t *const iseq,
11627 VALUE *const passed_values, const int passed_keyword_len, const VALUE *const passed_keywords,
11628 VALUE *const locals)
11629{
11630 const ID *acceptable_keywords = iseq->body->param.keyword->table;
11631 const int req_key_num = iseq->body->param.keyword->required_num;
11632 const int key_num = iseq->body->param.keyword->num;
11633 const VALUE * const default_values = iseq->body->param.keyword->default_values;
11634 VALUE missing = 0;
11635 int i, di, found = 0;
11636 int unspecified_bits = 0;
11637 VALUE unspecified_bits_value = ((VALUE)RUBY_Qnil);
11638 for (i=0; i<req_key_num; i++) {
11639 ID key = acceptable_keywords[i];
11640 if (args_setup_kw_parameters_lookup(key, &locals[i], passed_keywords, passed_values, passed_keyword_len)) {
11641 found++;
11642 }
11643 else {
11644 if (!missing) missing = rb_ary_tmp_new(1);
11645 rb_ary_push(missing, (rb_id2sym(key)));
11646 }
11647 }
11648 if (missing) argument_kw_error(ec, iseq, "missing", missing);
11649 for (di=0; i<key_num; i++, di++) {
11650 if (args_setup_kw_parameters_lookup(acceptable_keywords[i], &locals[i], passed_keywords, passed_values, passed_keyword_len)) {
11651 found++;
11652 }
11653 else {
11654 if (default_values[di] == ((VALUE)RUBY_Qundef)) {
11655 locals[i] = ((VALUE)RUBY_Qnil);
11656 if ((__builtin_expect(!!(i < (32-1)), 1))) {
11657 unspecified_bits |= 0x01 << di;
11658 }
11659 else {
11660 if (!((VALUE)(unspecified_bits_value) != ((VALUE)RUBY_Qnil))) {
11661 int j;
11662 unspecified_bits_value = rb_hash_new();
11663 for (j=0; j<(32-1); j++) {
11664 if (unspecified_bits & (0x01 << j)) {
11665 rb_hash_aset(unspecified_bits_value, (((VALUE)(j))<<1 | RUBY_FIXNUM_FLAG), ((VALUE)RUBY_Qtrue));
11666 }
11667 }
11668 }
11669 rb_hash_aset(unspecified_bits_value, (((VALUE)(di))<<1 | RUBY_FIXNUM_FLAG), ((VALUE)RUBY_Qtrue));
11670 }
11671 }
11672 else {
11673 locals[i] = default_values[di];
11674 }
11675 }
11676 }
11677 if (iseq->body->param.flags.has_kwrest) {
11678 const int rest_hash_index = key_num + 1;
11679 locals[rest_hash_index] = make_rest_kw_hash(passed_keywords, passed_keyword_len, passed_values);
11680 }
11681 else {
11682 if (found != passed_keyword_len) {
11683 VALUE keys = make_unknown_kw_hash(passed_keywords, passed_keyword_len, passed_values);
11684 argument_kw_error(ec, iseq, "unknown", keys);
11685 }
11686 }
11687 if (!((VALUE)(unspecified_bits_value) != ((VALUE)RUBY_Qnil))) {
11688 unspecified_bits_value = (((VALUE)(unspecified_bits))<<1 | RUBY_FIXNUM_FLAG);
11689 }
11690 locals[key_num] = unspecified_bits_value;
11691}
11692static inline void
11693args_setup_kw_rest_parameter(VALUE keyword_hash, VALUE *locals)
11694{
11695 locals[0] = !((VALUE)(keyword_hash) != ((VALUE)RUBY_Qnil)) ? rb_hash_new() : rb_hash_dup(keyword_hash);
11696}
11697static inline void
11698args_setup_block_parameter(const rb_execution_context_t *ec, struct rb_calling_info *calling, VALUE *locals)
11699{
11700 VALUE block_handler = calling->block_handler;
11701 *locals = rb_vm_bh_to_procval(ec, block_handler);
11702}
11704 VALUE *keys;
11705 VALUE *vals;
11706 int argc;
11707};
11708static int
11709fill_keys_values(st_data_t key, st_data_t val, st_data_t ptr)
11710{
11711 struct fill_values_arg *arg = (struct fill_values_arg *)ptr;
11712 int i = arg->argc++;
11713 arg->keys[i] = (VALUE)key;
11714 arg->vals[i] = (VALUE)val;
11715 return ST_CONTINUE;
11716}
11717static int
11718setup_parameters_complex(rb_execution_context_t * const ec, const rb_iseq_t * const iseq,
11719 struct rb_calling_info *const calling,
11720 const struct rb_call_info *ci,
11721 VALUE * const locals, const enum arg_setup_type arg_setup_type)
11722{
11723 const int min_argc = iseq->body->param.lead_num + iseq->body->param.post_num;
11724 const int max_argc = (iseq->body->param.flags.has_rest == 0) ? min_argc + iseq->body->param.opt_num : (-1);
11725 int opt_pc = 0;
11726 int given_argc;
11727 int kw_splat = 0;
11728 struct args_info args_body, *args;
11729 VALUE keyword_hash = ((VALUE)RUBY_Qnil);
11730 VALUE * const orig_sp = ec->cfp->sp;
11731 unsigned int i;
11732 for (i=calling->argc; i<iseq->body->param.size; i++) {
11733 locals[i] = ((VALUE)RUBY_Qnil);
11734 }
11735 ec->cfp->sp = &locals[i];
11736 args = &args_body;
11737 given_argc = args->argc = calling->argc;
11738 args->argv = locals;
11739 args->rest_dupped = 0;
11740 if (ci->flag & (0x01 << VM_CALL_KWARG_bit)) {
11741 args->kw_arg = ((struct rb_call_info_with_kwarg *)ci)->kw_arg;
11742 if (iseq->body->param.flags.has_kw) {
11743 int kw_len = args->kw_arg->keyword_len;
11744 args->kw_argv = (VALUE*)__builtin_alloca_with_align((sizeof(VALUE)*(kw_len)), _Alignof(VALUE) * 8);
11745 args->argc -= kw_len;
11746 given_argc -= kw_len;
11747 memcpy((args->kw_argv), (locals + args->argc), sizeof(VALUE)*(size_t)(kw_len));
11748 }
11749 else {
11750 args->kw_argv = ((void *)0);
11751 given_argc = args_kw_argv_to_hash(args);
11752 }
11753 }
11754 else {
11755 args->kw_arg = ((void *)0);
11756 args->kw_argv = ((void *)0);
11757 }
11758 if (ci->flag & (0x01 << VM_CALL_ARGS_SPLAT_bit)) {
11759 args->rest = locals[--args->argc];
11760 args->rest_index = 0;
11761 given_argc += rb_long2int_inline(rb_array_len(args->rest)) - 1;
11762 }
11763 else {
11764 args->rest = ((VALUE)RUBY_Qfalse);
11765 }
11766 switch (arg_setup_type) {
11767 case arg_setup_method:
11768 break;
11769 case arg_setup_block:
11770 if (given_argc == 1 &&
11771 (min_argc > 0 || iseq->body->param.opt_num > 1 ||
11772 iseq->body->param.flags.has_kw || iseq->body->param.flags.has_kwrest) &&
11773 !iseq->body->param.flags.ambiguous_param0 &&
11774 args_check_block_arg0(args)) {
11775 given_argc = rb_long2int_inline(rb_array_len(args->rest));
11776 }
11777 break;
11778 }
11779 if (given_argc < min_argc) {
11780 if (given_argc == min_argc - 1 && args->kw_argv) {
11781 args_stored_kw_argv_to_hash(args);
11782 given_argc = args_argc(args);
11783 }
11784 else {
11785 if (arg_setup_type == arg_setup_block) {
11786 if ((__builtin_expect(!!(!(!(1/!!(sizeof(*((ec->cfp)->sp)) == sizeof(VALUE))) || !(1/!!(sizeof(*(ec->cfp)) == sizeof(rb_control_frame_t))) || ((rb_control_frame_t *)(((ec->cfp)->sp) + (min_argc)) + 1) >= (ec->cfp))), 1))) {(void)0;} else vm_stackoverflow();
11787 given_argc = min_argc;
11788 args_extend(args, min_argc);
11789 }
11790 else {
11791 argument_arity_error(ec, iseq, given_argc, min_argc, max_argc);
11792 }
11793 }
11794 }
11795 if (ci->flag & (0x01 << VM_CALL_KW_SPLAT_bit)) {
11796 kw_splat = !iseq->body->param.flags.has_rest;
11797 }
11798 if (given_argc > min_argc &&
11799 (iseq->body->param.flags.has_kw || iseq->body->param.flags.has_kwrest ||
11800 (kw_splat && given_argc > max_argc)) &&
11801 args->kw_argv == ((void *)0)) {
11802 if (args_pop_keyword_hash(args, &keyword_hash)) {
11803 given_argc--;
11804 }
11805 }
11806 if (given_argc > max_argc && max_argc != (-1)) {
11807 if (arg_setup_type == arg_setup_block) {
11808 args_reduce(args, given_argc - max_argc);
11809 given_argc = max_argc;
11810 }
11811 else {
11812 argument_arity_error(ec, iseq, given_argc, min_argc, max_argc);
11813 }
11814 }
11815 if (iseq->body->param.flags.has_lead) {
11816 args_setup_lead_parameters(args, iseq->body->param.lead_num, locals + 0);
11817 }
11818 if (iseq->body->param.flags.has_rest || iseq->body->param.flags.has_post){
11819 args_copy(args);
11820 }
11821 if (iseq->body->param.flags.has_post) {
11822 args_setup_post_parameters(args, iseq->body->param.post_num, locals + iseq->body->param.post_start);
11823 }
11824 if (iseq->body->param.flags.has_opt) {
11825 int opt = args_setup_opt_parameters(args, iseq->body->param.opt_num, locals + iseq->body->param.lead_num);
11826 opt_pc = (int)iseq->body->param.opt_table[opt];
11827 }
11828 if (iseq->body->param.flags.has_rest) {
11829 args_setup_rest_parameter(args, locals + iseq->body->param.rest_start);
11830 }
11831 if (iseq->body->param.flags.has_kw) {
11832 VALUE * const klocals = locals + iseq->body->param.keyword->bits_start - iseq->body->param.keyword->num;
11833 if (args->kw_argv != ((void *)0)) {
11834 const struct rb_call_info_kw_arg *kw_arg = args->kw_arg;
11835 args_setup_kw_parameters(ec, iseq, args->kw_argv, kw_arg->keyword_len, kw_arg->keywords, klocals);
11836 }
11837 else if (!!((VALUE)(keyword_hash) != ((VALUE)RUBY_Qnil))) {
11838 int kw_len = rb_long2int_inline(((!(((struct RBasic*)((keyword_hash)))->flags&(RHASH_ST_TABLE_FLAG))) ? ((unsigned int)((((struct RBasic*)(keyword_hash))->flags & (VALUE)RHASH_AR_TABLE_SIZE_MASK) >> RHASH_AR_TABLE_SIZE_SHIFT)) : ((((struct RHash*)(keyword_hash))->as.st)->num_entries)));
11839 struct fill_values_arg arg;
11840 arg.keys = args->kw_argv = (VALUE*)__builtin_alloca_with_align((sizeof(VALUE)*(kw_len * 2)), _Alignof(VALUE) * 8);
11841 arg.vals = arg.keys + kw_len;
11842 arg.argc = 0;
11843 rb_hash_foreach(keyword_hash, fill_keys_values, (VALUE)&arg);
11844 ((void)0);
11845 args_setup_kw_parameters(ec, iseq, arg.vals, kw_len, arg.keys, klocals);
11846 }
11847 else {
11848 ((void)0);
11849 args_setup_kw_parameters(ec, iseq, ((void *)0), 0, ((void *)0), klocals);
11850 }
11851 }
11852 else if (iseq->body->param.flags.has_kwrest) {
11853 args_setup_kw_rest_parameter(keyword_hash, locals + iseq->body->param.keyword->rest_start);
11854 }
11855 else if (!!((VALUE)(keyword_hash) != ((VALUE)RUBY_Qnil)) && ((!(((struct RBasic*)((keyword_hash)))->flags&(RHASH_ST_TABLE_FLAG))) ? ((unsigned int)((((struct RBasic*)(keyword_hash))->flags & (VALUE)RHASH_AR_TABLE_SIZE_MASK) >> RHASH_AR_TABLE_SIZE_SHIFT)) : ((((struct RHash*)(keyword_hash))->as.st)->num_entries)) > 0) {
11856 argument_kw_error(ec, iseq, "unknown", rb_hash_keys(keyword_hash));
11857 }
11858 else if (kw_splat && !((VALUE)(keyword_hash) != ((VALUE)RUBY_Qnil))) {
11859 if (!(((VALUE)((*rb_ruby_verbose_ptr())) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) {
11860 VALUE path = rb_iseq_path(iseq);
11861 VALUE line = rb_iseq_first_lineno(iseq);
11862 VALUE label = rb_iseq_label(iseq);
11863 rb_compile_warning(!((VALUE)(path) != ((VALUE)RUBY_Qnil)) ? ((void *)0) : (!(((struct RBasic*)(path))->flags & RSTRING_NOEMBED) ? ((struct RString*)(path))->as.ary : ((struct RString*)(path))->as.heap.ptr), ((int)rb_fix2int((VALUE)(line))),
11864 "in `%s': the last argument was passed as a single Hash",
11865 !((VALUE)(label) != ((VALUE)RUBY_Qnil)) ? ((void *)0) : (!(((struct RBasic*)(label))->flags & RSTRING_NOEMBED) ? ((struct RString*)(label))->as.ary : ((struct RString*)(label))->as.heap.ptr));
11866 rb_warning("although a splat keyword arguments here");
11867 }
11868 }
11869 if (iseq->body->param.flags.has_block) {
11870 if (iseq->body->local_iseq == iseq) {
11871 }
11872 else {
11873 args_setup_block_parameter(ec, calling, locals + iseq->body->param.block_start);
11874 }
11875 }
11876 ec->cfp->sp = orig_sp;
11877 return opt_pc;
11878}
11879void rb_backtrace_use_iseq_first_lineno_for_last_location(VALUE self);
11880static void
11881raise_argument_error(rb_execution_context_t *ec, const rb_iseq_t *iseq, const VALUE exc)
11882{
11883 VALUE at;
11884 if (iseq) {
11885 vm_push_frame(ec, iseq, VM_FRAME_MAGIC_DUMMY | VM_ENV_FLAG_LOCAL, ((VALUE)RUBY_Qnil) ,
11886 0 , ((VALUE)RUBY_Qfalse) ,
11887 iseq->body->iseq_encoded,
11888 ec->cfp->sp, 0, 0 );
11889 at = rb_ec_backtrace_object(ec);
11890 rb_backtrace_use_iseq_first_lineno_for_last_location(at);
11891 rb_vm_pop_frame(ec);
11892 }
11893 else {
11894 at = rb_ec_backtrace_object(ec);
11895 }
11896 rb_ivar_set(exc, idBt_locations, at);
11897 rb_exc_set_backtrace(exc, at);
11898 rb_exc_raise(exc);
11899}
11900static void
11901argument_arity_error(rb_execution_context_t *ec, const rb_iseq_t *iseq, const int miss_argc, const int min_argc, const int max_argc)
11902{
11903 VALUE exc = rb_arity_error_new(miss_argc, min_argc, max_argc);
11904 if (iseq->body->param.flags.has_kw) {
11905 const struct rb_iseq_param_keyword *const kw = iseq->body->param.keyword;
11906 const ID *keywords = kw->table;
11907 int req_key_num = kw->required_num;
11908 if (req_key_num > 0) {
11909 static const char required[] = "; required keywords";
11910 VALUE mesg = rb_attr_get(exc, idMesg);
11911 rb_str_resize(mesg, (!(((struct RBasic*)(mesg))->flags & RSTRING_NOEMBED) ? (long)((((struct RBasic*)(mesg))->flags >> RSTRING_EMBED_LEN_SHIFT) & (RSTRING_EMBED_LEN_MASK >> RSTRING_EMBED_LEN_SHIFT)) : ((struct RString*)(mesg))->as.heap.len)-1);
11912 rb_str_cat(mesg, required, sizeof(required) - 1 - (req_key_num == 1));
11913 __extension__ ({ (__builtin_constant_p(":")) ? rb_str_cat((mesg), (":"), (long)strlen(":")) : rb_str_cat_cstr((mesg), (":")); });
11914 do {
11915 __extension__ ({ (__builtin_constant_p(" ")) ? rb_str_cat((mesg), (" "), (long)strlen(" ")) : rb_str_cat_cstr((mesg), (" ")); });
11916 rb_str_append(mesg, rb_id2str(*keywords++));
11917 __extension__ ({ (__builtin_constant_p(",")) ? rb_str_cat((mesg), (","), (long)strlen(",")) : rb_str_cat_cstr((mesg), (",")); });
11918 } while (--req_key_num);
11919 (!(((struct RBasic*)(mesg))->flags & RSTRING_NOEMBED) ? ((struct RString*)(mesg))->as.ary : ((struct RString*)(mesg))->as.heap.ptr)[(!(((struct RBasic*)(mesg))->flags & RSTRING_NOEMBED) ? (long)((((struct RBasic*)(mesg))->flags >> RSTRING_EMBED_LEN_SHIFT) & (RSTRING_EMBED_LEN_MASK >> RSTRING_EMBED_LEN_SHIFT)) : ((struct RString*)(mesg))->as.heap.len)-1] = ')';
11920 }
11921 }
11922 raise_argument_error(ec, iseq, exc);
11923}
11924static void
11925argument_kw_error(rb_execution_context_t *ec, const rb_iseq_t *iseq, const char *error, const VALUE keys)
11926{
11927 raise_argument_error(ec, iseq, rb_keyword_error_new(error, keys));
11928}
11929static inline void
11930vm_caller_setup_arg_splat(rb_control_frame_t *cfp, struct rb_calling_info *calling)
11931{
11932 int argc = calling->argc;
11933 VALUE *argv = cfp->sp - argc;
11934 VALUE ary = argv[argc-1];
11935 cfp->sp--;
11936 if (!!((VALUE)(ary) != ((VALUE)RUBY_Qnil))) {
11937 const VALUE *ptr = rb_array_const_ptr_transient(ary);
11938 long len = rb_array_len(ary), i;
11939 if ((__builtin_expect(!!(!(!(1/!!(sizeof(*((cfp)->sp)) == sizeof(VALUE))) || !(1/!!(sizeof(*(cfp)) == sizeof(rb_control_frame_t))) || ((rb_control_frame_t *)(((cfp)->sp) + (len)) + 1) >= (cfp))), 1))) {(void)0;} else vm_stackoverflow();
11940 for (i = 0; i < len; i++) {
11941 *cfp->sp++ = ptr[i];
11942 }
11943 calling->argc += i - 1;
11944 }
11945}
11946static inline void
11947vm_caller_setup_arg_kw(rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci)
11948{
11949 struct rb_call_info_with_kwarg *ci_kw = (struct rb_call_info_with_kwarg *)ci;
11950 const VALUE *const passed_keywords = ci_kw->kw_arg->keywords;
11951 const int kw_len = ci_kw->kw_arg->keyword_len;
11952 const VALUE h = rb_hash_new_with_size(kw_len);
11953 VALUE *sp = cfp->sp;
11954 int i;
11955 for (i=0; i<kw_len; i++) {
11956 rb_hash_aset(h, passed_keywords[i], (sp - kw_len)[i]);
11957 }
11958 (sp-kw_len)[0] = h;
11959 cfp->sp -= kw_len - 1;
11960 calling->argc -= kw_len - 1;
11961}
11962static VALUE
11963vm_to_proc(VALUE proc)
11964{
11965 if ((__builtin_expect(!!(!rb_obj_is_proc(proc)), 0))) {
11966 VALUE b;
11967 const rb_callable_method_entry_t *me =
11968 rb_callable_method_entry_with_refinements(rb_class_of((VALUE)(proc)), idTo_proc, ((void *)0));
11969 if (me) {
11970 b = rb_vm_call0(rb_current_execution_context(), proc, idTo_proc, 0, ((void *)0), me);
11971 }
11972 else {
11973 b = rb_check_convert_type_with_id(proc, RUBY_T_DATA, "Proc", idTo_proc);
11974 }
11975 if (!((VALUE)(b) != ((VALUE)RUBY_Qnil)) || !rb_obj_is_proc(b)) {
11976 rb_raise(rb_eTypeError,
11977 "wrong argument type %s (expected Proc)",
11978 rb_obj_classname(proc));
11979 }
11980 return b;
11981 }
11982 else {
11983 return proc;
11984 }
11985}
11986static VALUE
11987refine_sym_proc_call(VALUE yielded_arg, VALUE callback_arg, int argc, const VALUE *argv, VALUE blockarg)
11988{
11989 VALUE obj;
11990 ID mid;
11993 const VALUE symbol = (rb_array_const_ptr_transient(callback_arg)[0]);
11994 const VALUE refinements = (rb_array_const_ptr_transient(callback_arg)[1]);
11995 VALUE klass;
11996 if (argc-- < 1) {
11997 rb_raise(rb_eArgError, "no receiver given");
11998 }
11999 obj = *argv++;
12000 mid = (rb_sym2id(symbol));
12001 for (klass = rb_class_of((VALUE)(obj)); klass; klass = RCLASS_SUPER(klass)) {
12002 me = rb_callable_method_entry(klass, mid);
12003 if (me) {
12004 me = rb_resolve_refined_method_callable(refinements, me);
12005 if (me) break;
12006 }
12007 }
12008 ec = rb_current_execution_context();
12009 if (!!((VALUE)(blockarg) != ((VALUE)RUBY_Qnil))) {
12010 vm_passed_block_handler_set(ec, blockarg);
12011 }
12012 if (!me) {
12013 return method_missing(obj, mid, argc, argv, MISSING_NOENTRY);
12014 }
12015 return rb_vm_call0(ec, obj, mid, argc, argv, me);
12016}
12017static VALUE
12018vm_caller_setup_arg_block(const rb_execution_context_t *ec, rb_control_frame_t *reg_cfp,
12019 const struct rb_call_info *ci, rb_iseq_t *blockiseq, const int is_super)
12020{
12021 if (ci->flag & (0x01 << VM_CALL_ARGS_BLOCKARG_bit)) {
12022 VALUE block_code = *(--reg_cfp->sp);
12023 if (!((VALUE)(block_code) != ((VALUE)RUBY_Qnil))) {
12024 return 0;
12025 }
12026 else if (block_code == rb_block_param_proxy) {
12027 return VM_CF_BLOCK_HANDLER(reg_cfp);
12028 }
12029 else if (((((VALUE)(block_code)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(block_code) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(block_code) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(block_code))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) && rb_method_basic_definition_p(rb_cSymbol, idTo_proc)) {
12030 const rb_cref_t *cref = vm_env_cref(reg_cfp->ep);
12031 if (cref && !!((VALUE)(cref->refinements) != ((VALUE)RUBY_Qnil))) {
12032 VALUE ref = cref->refinements;
12033 VALUE func = rb_hash_lookup(ref, block_code);
12034 if (!((VALUE)(func) != ((VALUE)RUBY_Qnil))) {
12035 VALUE callback_arg = rb_ary_tmp_new(2);
12036 do { const VALUE _ary = (callback_arg); const VALUE _v = (block_code); VALUE *ptr = (VALUE *)rb_array_ptr_use_start(_ary, 1); rb_obj_write((VALUE)(_ary), (VALUE *)(&ptr[0]), (VALUE)(_v), "./vm_args.c", 903); rb_array_ptr_use_end(_ary, 1); } while (0);
12037 do { const VALUE _ary = (callback_arg); const VALUE _v = (ref); VALUE *ptr = (VALUE *)rb_array_ptr_use_start(_ary, 1); rb_obj_write((VALUE)(_ary), (VALUE *)(&ptr[1]), (VALUE)(_v), "./vm_args.c", 904); rb_array_ptr_use_end(_ary, 1); } while (0);
12038 (void)(((struct RBasic*)(callback_arg))->flags |= RUBY_FL_FREEZE);
12039 func = rb_func_proc_new(refine_sym_proc_call, callback_arg);
12040 rb_hash_aset(ref, block_code, func);
12041 }
12042 block_code = func;
12043 }
12044 return block_code;
12045 }
12046 else {
12047 return vm_to_proc(block_code);
12048 }
12049 }
12050 else if (blockiseq != ((void *)0)) {
12051 struct rb_captured_block *captured = VM_CFP_TO_CAPTURED_BLOCK(reg_cfp);
12052 captured->code.iseq = blockiseq;
12053 return VM_BH_FROM_ISEQ_BLOCK(captured);
12054 }
12055 else {
12056 if (is_super) {
12057 return ((VM_EP_LEP(((((reg_cfp)->ep)))))[(-1)]);
12058 }
12059 else {
12060 return 0;
12061 }
12062 }
12063}
12064static inline VALUE vm_call_iseq_setup_2(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc, int opt_pc, int param_size, int local_size);
12065__attribute__ ((__always_inline__)) static VALUE vm_call_iseq_setup_normal(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const rb_callable_method_entry_t *me, int opt_pc, int param_size, int local_size);
12066static inline VALUE vm_call_iseq_setup_tailcall(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc, int opt_pc);
12067static VALUE vm_call_super_method(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc);
12068static VALUE vm_call_method_nome(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc);
12069static VALUE vm_call_method_each_type(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc);
12070static inline VALUE vm_call_method(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc);
12071static vm_call_handler vm_call_iseq_setup_func(const struct rb_call_info *ci, const int param_size, const int local_size);
12072static VALUE
12073vm_call_iseq_setup_tailcall_0start(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
12074{
12075 return vm_call_iseq_setup_tailcall(ec, cfp, calling, ci, cc, 0);
12076}
12077static VALUE
12078vm_call_iseq_setup_normal_0start(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
12079{
12080 const rb_iseq_t *iseq = def_iseq_ptr(cc->me->def);
12081 int param = iseq->body->param.size;
12082 int local = iseq->body->local_table_size;
12083 return vm_call_iseq_setup_normal(ec, cfp, calling, cc->me, 0, param, local);
12084}
12085static int
12086rb_simple_iseq_p(const rb_iseq_t *iseq)
12087{
12088 return iseq->body->param.flags.has_opt == 0 &&
12089 iseq->body->param.flags.has_rest == 0 &&
12090 iseq->body->param.flags.has_post == 0 &&
12091 iseq->body->param.flags.has_kw == 0 &&
12092 iseq->body->param.flags.has_kwrest == 0 &&
12093 iseq->body->param.flags.has_block == 0;
12094}
12095static inline int
12096vm_callee_setup_arg(rb_execution_context_t *ec, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc,
12097 const rb_iseq_t *iseq, VALUE *argv, int param_size, int local_size)
12098{
12099 if ((__builtin_expect(!!(rb_simple_iseq_p(iseq) && !(ci->flag & (0x01 << VM_CALL_KW_SPLAT_bit))), 1))) {
12100 rb_control_frame_t *cfp = ec->cfp;
12101 do { if ((__builtin_expect(!!(((ci)->flag & (0x01 << VM_CALL_ARGS_SPLAT_bit))), 0))) vm_caller_setup_arg_splat((cfp), (calling)); if ((__builtin_expect(!!(((ci)->flag & (0x01 << VM_CALL_KWARG_bit))), 0))) vm_caller_setup_arg_kw((cfp), (calling), (ci)); } while (0);
12102 if (calling->argc != iseq->body->param.lead_num) {
12103 argument_arity_error(ec, iseq, calling->argc, iseq->body->param.lead_num, iseq->body->param.lead_num);
12104 }
12105 do { if ((__builtin_expect(!!((!((ci)->flag & (0x01 << VM_CALL_ARGS_SPLAT_bit)) && !((ci)->flag & (0x01 << VM_CALL_KWARG_bit)) && !((rb_method_visibility_t)(((cc->me)->flags & (((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5))) >> ((((VALUE)RUBY_FL_USHIFT) + 4)+0)) == METHOD_VISI_PROTECTED))), 1))) ((cc)->call = (vm_call_iseq_setup_func(ci, param_size, local_size))); } while (0);
12106 return 0;
12107 }
12108 else {
12109 return setup_parameters_complex(ec, iseq, calling, ci, argv, arg_setup_method);
12110 }
12111}
12112static VALUE
12113vm_call_iseq_setup(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
12114{
12115 const rb_iseq_t *iseq = def_iseq_ptr(cc->me->def);
12116 const int param_size = iseq->body->param.size;
12117 const int local_size = iseq->body->local_table_size;
12118 const int opt_pc = vm_callee_setup_arg(ec, calling, ci, cc, def_iseq_ptr(cc->me->def), cfp->sp - calling->argc, param_size, local_size);
12119 return vm_call_iseq_setup_2(ec, cfp, calling, ci, cc, opt_pc, param_size, local_size);
12120}
12121static inline VALUE
12122vm_call_iseq_setup_2(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc,
12123 int opt_pc, int param_size, int local_size)
12124{
12125 if ((__builtin_expect(!!(!(ci->flag & (0x01 << VM_CALL_TAILCALL_bit))), 1))) {
12126 return vm_call_iseq_setup_normal(ec, cfp, calling, cc->me, opt_pc, param_size, local_size);
12127 }
12128 else {
12129 return vm_call_iseq_setup_tailcall(ec, cfp, calling, ci, cc, opt_pc);
12130 }
12131}
12132static inline VALUE
12133vm_call_iseq_setup_normal(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const rb_callable_method_entry_t *me,
12134 int opt_pc, int param_size, int local_size)
12135{
12136 const rb_iseq_t *iseq = def_iseq_ptr(me->def);
12137 VALUE *argv = cfp->sp - calling->argc;
12138 VALUE *sp = argv + param_size;
12139 cfp->sp = argv - 1 ;
12140 vm_push_frame(ec, iseq, VM_FRAME_MAGIC_METHOD | VM_ENV_FLAG_LOCAL, calling->recv,
12141 calling->block_handler, (VALUE)me,
12142 iseq->body->iseq_encoded + opt_pc, sp,
12143 local_size - param_size,
12144 iseq->body->stack_max);
12145 return ((VALUE)RUBY_Qundef);
12146}
12147static inline VALUE
12148vm_call_iseq_setup_tailcall(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc,
12149 int opt_pc)
12150{
12151 unsigned int i;
12152 VALUE *argv = cfp->sp - calling->argc;
12153 const rb_callable_method_entry_t *me = cc->me;
12154 const rb_iseq_t *iseq = def_iseq_ptr(me->def);
12155 VALUE *src_argv = argv;
12156 VALUE *sp_orig, *sp;
12157 VALUE finish_flag = VM_FRAME_FINISHED_P(cfp) ? VM_FRAME_FLAG_FINISH : 0;
12158 if (VM_BH_FROM_CFP_P(calling->block_handler, cfp)) {
12159 struct rb_captured_block *dst_captured = VM_CFP_TO_CAPTURED_BLOCK(((cfp)+1));
12160 const struct rb_captured_block *src_captured = VM_BH_TO_CAPT_BLOCK(calling->block_handler);
12161 dst_captured->code.val = src_captured->code.val;
12162 if (VM_BH_ISEQ_BLOCK_P(calling->block_handler)) {
12163 calling->block_handler = VM_BH_FROM_ISEQ_BLOCK(dst_captured);
12164 }
12165 else {
12166 calling->block_handler = VM_BH_FROM_IFUNC_BLOCK(dst_captured);
12167 }
12168 }
12169 vm_pop_frame(ec, cfp, cfp->ep);
12170 cfp = ec->cfp;
12171 sp_orig = sp = cfp->sp;
12172 sp[0] = calling->recv;
12173 sp++;
12174 for (i=0; i < iseq->body->param.size; i++) {
12175 *sp++ = src_argv[i];
12176 }
12177 vm_push_frame(ec, iseq, VM_FRAME_MAGIC_METHOD | VM_ENV_FLAG_LOCAL | finish_flag,
12178 calling->recv, calling->block_handler, (VALUE)me,
12179 iseq->body->iseq_encoded + opt_pc, sp,
12180 iseq->body->local_table_size - iseq->body->param.size,
12181 iseq->body->stack_max);
12182 cfp->sp = sp_orig;
12183 rb_vm_check_ints(ec);
12184 return ((VALUE)RUBY_Qundef);
12185}
12186static VALUE
12187call_cfunc_m2(VALUE (*func)(), VALUE recv, int argc, const VALUE *argv)
12188{
12189 return (*func)(recv, rb_ary_new_from_values(argc, argv));
12190}
12191static VALUE
12192call_cfunc_m1(VALUE (*func)(), VALUE recv, int argc, const VALUE *argv)
12193{
12194 return (*func)(argc, argv, recv);
12195}
12196static VALUE
12197call_cfunc_0(VALUE (*func)(), VALUE recv, int argc, const VALUE *argv)
12198{
12199 return (*func)(recv);
12200}
12201static VALUE
12202call_cfunc_1(VALUE (*func)(), VALUE recv, int argc, const VALUE *argv)
12203{
12204 return (*func)(recv, argv[0]);
12205}
12206static VALUE
12207call_cfunc_2(VALUE (*func)(), VALUE recv, int argc, const VALUE *argv)
12208{
12209 return (*func)(recv, argv[0], argv[1]);
12210}
12211static VALUE
12212call_cfunc_3(VALUE (*func)(), VALUE recv, int argc, const VALUE *argv)
12213{
12214 return (*func)(recv, argv[0], argv[1], argv[2]);
12215}
12216static VALUE
12217call_cfunc_4(VALUE (*func)(), VALUE recv, int argc, const VALUE *argv)
12218{
12219 return (*func)(recv, argv[0], argv[1], argv[2], argv[3]);
12220}
12221static VALUE
12222call_cfunc_5(VALUE (*func)(), VALUE recv, int argc, const VALUE *argv)
12223{
12224 return (*func)(recv, argv[0], argv[1], argv[2], argv[3], argv[4]);
12225}
12226static VALUE
12227call_cfunc_6(VALUE (*func)(), VALUE recv, int argc, const VALUE *argv)
12228{
12229 return (*func)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5]);
12230}
12231static VALUE
12232call_cfunc_7(VALUE (*func)(), VALUE recv, int argc, const VALUE *argv)
12233{
12234 return (*func)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]);
12235}
12236static VALUE
12237call_cfunc_8(VALUE (*func)(), VALUE recv, int argc, const VALUE *argv)
12238{
12239 return (*func)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7]);
12240}
12241static VALUE
12242call_cfunc_9(VALUE (*func)(), VALUE recv, int argc, const VALUE *argv)
12243{
12244 return (*func)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8]);
12245}
12246static VALUE
12247call_cfunc_10(VALUE (*func)(), VALUE recv, int argc, const VALUE *argv)
12248{
12249 return (*func)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9]);
12250}
12251static VALUE
12252call_cfunc_11(VALUE (*func)(), VALUE recv, int argc, const VALUE *argv)
12253{
12254 return (*func)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10]);
12255}
12256static VALUE
12257call_cfunc_12(VALUE (*func)(), VALUE recv, int argc, const VALUE *argv)
12258{
12259 return (*func)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11]);
12260}
12261static VALUE
12262call_cfunc_13(VALUE (*func)(), VALUE recv, int argc, const VALUE *argv)
12263{
12264 return (*func)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11], argv[12]);
12265}
12266static VALUE
12267call_cfunc_14(VALUE (*func)(), VALUE recv, int argc, const VALUE *argv)
12268{
12269 return (*func)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11], argv[12], argv[13]);
12270}
12271static VALUE
12272call_cfunc_15(VALUE (*func)(), VALUE recv, int argc, const VALUE *argv)
12273{
12274 return (*func)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11], argv[12], argv[13], argv[14]);
12275}
12276static inline int
12277vm_cfp_consistent_p(rb_execution_context_t *ec, const rb_control_frame_t *reg_cfp)
12278{
12279 const int ov_flags = RAISED_STACKOVERFLOW;
12280 if ((__builtin_expect(!!(reg_cfp == ec->cfp + 1), 1))) return 1;
12281 if ((((ec)->raised_flag & (ov_flags)) != 0)) {
12282 ((ec)->raised_flag &= ~(ov_flags));
12283 return 1;
12284 }
12285 return 0;
12286}
12287static inline
12288const rb_method_cfunc_t *
12289vm_method_cfunc_entry(const rb_callable_method_entry_t *me)
12290{
12291 return &me->def->body.cfunc;
12292}
12293static VALUE
12294vm_call_cfunc_with_frame(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
12295{
12296 VALUE val;
12297 const rb_callable_method_entry_t *me = cc->me;
12298 const rb_method_cfunc_t *cfunc = vm_method_cfunc_entry(me);
12299 int len = cfunc->argc;
12300 VALUE recv = calling->recv;
12301 VALUE block_handler = calling->block_handler;
12302 int argc = calling->argc;
12303 do { if ((__builtin_expect(!!(0), 0))) { struct ruby_dtrace_method_hook_args args; if (rb_dtrace_setup(ec, me->owner, me->def->original_id, &args)) { do {} while (0); } } } while (0);
12304 do { const rb_event_flag_t flag_arg_ = (0x0020); rb_hook_list_t *hooks_arg_ = (rb_vm_global_hooks(ec)); if ((__builtin_expect(!!((hooks_arg_)->events & (flag_arg_)), 0))) { rb_exec_event_hook_orig(ec, hooks_arg_, flag_arg_, recv, me->def->original_id, ci->mid, me->owner, ((VALUE)RUBY_Qundef), 0); } } while (0);
12305 vm_push_frame(ec, ((void *)0), VM_FRAME_MAGIC_CFUNC | VM_FRAME_FLAG_CFRAME | VM_ENV_FLAG_LOCAL, recv,
12306 block_handler, (VALUE)me,
12307 0, ec->cfp->sp, 0, 0);
12308 if (len >= 0) rb_check_arity(argc, len, len);
12309 reg_cfp->sp -= argc + 1;
12310 val = (*cfunc->invoker)(cfunc->func, recv, argc, reg_cfp->sp + 1);
12311 ((__builtin_expect(!!(vm_cfp_consistent_p(ec, reg_cfp)), 1)) ? (void)0 : rb_bug("vm_call_cfunc" ": cfp consistency error (%p, %p)", (void *)reg_cfp, (void *)(ec->cfp+1)));
12312 rb_vm_pop_frame(ec);
12313 do { const rb_event_flag_t flag_arg_ = (0x0040); rb_hook_list_t *hooks_arg_ = (rb_vm_global_hooks(ec)); if ((__builtin_expect(!!((hooks_arg_)->events & (flag_arg_)), 0))) { rb_exec_event_hook_orig(ec, hooks_arg_, flag_arg_, recv, me->def->original_id, ci->mid, me->owner, val, 0); } } while (0);
12314 do { if ((__builtin_expect(!!(0), 0))) { struct ruby_dtrace_method_hook_args args; if (rb_dtrace_setup(ec, me->owner, me->def->original_id, &args)) { do {} while (0); } } } while (0);
12315 return val;
12316}
12317static VALUE
12318vm_call_cfunc(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
12319{
12320 do { if ((__builtin_expect(!!(((ci)->flag & (0x01 << VM_CALL_ARGS_SPLAT_bit))), 0))) vm_caller_setup_arg_splat((reg_cfp), (calling)); if ((__builtin_expect(!!(((ci)->flag & (0x01 << VM_CALL_KWARG_bit))), 0))) vm_caller_setup_arg_kw((reg_cfp), (calling), (ci)); } while (0);
12321 return vm_call_cfunc_with_frame(ec, reg_cfp, calling, ci, cc);
12322}
12323static VALUE
12324vm_call_ivar(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
12325{
12326 cfp->sp -= 1;
12327 return vm_getivar(calling->recv, cc->me->def->body.attr.id, ((void *)0), cc, 1);
12328}
12329static VALUE
12330vm_call_attrset(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
12331{
12332 VALUE val = *(cfp->sp - 1);
12333 cfp->sp -= 2;
12334 return vm_setivar(calling->recv, cc->me->def->body.attr.id, val, ((void *)0), cc, 1);
12335}
12336static inline VALUE
12337vm_call_bmethod_body(rb_execution_context_t *ec, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc, const VALUE *argv)
12338{
12339 rb_proc_t *proc;
12340 VALUE val;
12341 (((proc)) = (rb_proc_t*)(((struct RData*)(((cc->me->def->body.bmethod.proc))))->data));
12342 val = rb_vm_invoke_bmethod(ec, proc, calling->recv, calling->argc, argv, calling->block_handler, cc->me);
12343 return val;
12344}
12345static VALUE
12346vm_call_bmethod(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
12347{
12348 VALUE *argv;
12349 int argc;
12350 do { if ((__builtin_expect(!!(((ci)->flag & (0x01 << VM_CALL_ARGS_SPLAT_bit))), 0))) vm_caller_setup_arg_splat((cfp), (calling)); if ((__builtin_expect(!!(((ci)->flag & (0x01 << VM_CALL_KWARG_bit))), 0))) vm_caller_setup_arg_kw((cfp), (calling), (ci)); } while (0);
12351 argc = calling->argc;
12352 argv = (VALUE*)__builtin_alloca_with_align((sizeof(VALUE)*(argc)), _Alignof(VALUE) * 8);
12353 memcpy((argv), (cfp->sp - argc), sizeof(VALUE)*(size_t)(argc));
12354 cfp->sp += - argc - 1;
12355 return vm_call_bmethod_body(ec, calling, ci, cc, argv);
12356}
12357static enum method_missing_reason
12358ci_missing_reason(const struct rb_call_info *ci)
12359{
12360 enum method_missing_reason stat = MISSING_NOENTRY;
12361 if (ci->flag & (0x01 << VM_CALL_VCALL_bit)) stat |= MISSING_VCALL;
12362 if (ci->flag & (0x01 << VM_CALL_FCALL_bit)) stat |= MISSING_FCALL;
12363 if (ci->flag & (0x01 << VM_CALL_SUPER_bit)) stat |= MISSING_SUPER;
12364 return stat;
12365}
12366static VALUE
12367vm_call_opt_send(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, const struct rb_call_info *orig_ci, struct rb_call_cache *orig_cc)
12368{
12369 int i;
12370 VALUE sym;
12371 struct rb_call_info *ci;
12372 struct rb_call_info_with_kwarg ci_entry;
12373 struct rb_call_cache cc_entry, *cc;
12374 do { if ((__builtin_expect(!!(((orig_ci)->flag & (0x01 << VM_CALL_ARGS_SPLAT_bit))), 0))) vm_caller_setup_arg_splat((reg_cfp), (calling)); if ((__builtin_expect(!!(((orig_ci)->flag & (0x01 << VM_CALL_KWARG_bit))), 0))) vm_caller_setup_arg_kw((reg_cfp), (calling), (orig_ci)); } while (0);
12375 i = calling->argc - 1;
12376 if (calling->argc == 0) {
12377 rb_raise(rb_eArgError, "no method name given");
12378 }
12379 if (orig_ci->flag & (0x01 << VM_CALL_KWARG_bit)) {
12380 ci = (struct rb_call_info *)&ci_entry;
12381 ci_entry = *(struct rb_call_info_with_kwarg *)orig_ci;
12382 }
12383 else {
12384 ci = &ci_entry.ci;
12385 ci_entry.ci = *orig_ci;
12386 }
12387 ci->flag = ci->flag & ~(0x01 << VM_CALL_KWARG_bit);
12388 cc_entry = *orig_cc;
12389 cc = &cc_entry;
12390 sym = (*(((((reg_cfp)->sp)))-(i)-1));
12391 if (!(ci->mid = rb_check_id(&sym))) {
12392 if (rb_method_basic_definition_p(rb_class_of((VALUE)(calling->recv)), idMethodMissing)) {
12393 VALUE exc =
12394 rb_make_no_method_exception(rb_eNoMethodError, 0, calling->recv,
12395 rb_long2int_inline(calling->argc), &(*(((((reg_cfp)->sp)))-(i)-1)),
12396 ci->flag & ((0x01 << VM_CALL_FCALL_bit)|(0x01 << VM_CALL_VCALL_bit)));
12397 rb_exc_raise(exc);
12398 }
12399 (*(((((reg_cfp)->sp)))-(i)-1)) = rb_str_intern(sym);
12400 ci->mid = idMethodMissing;
12401 ec->method_missing_reason = cc->aux.method_missing_reason = ci_missing_reason(ci);
12402 }
12403 else {
12404 if (i > 0) {
12405 memmove((&(*(((((reg_cfp)->sp)))-(i)-1))), (&(*(((((reg_cfp)->sp)))-(i-1)-1))), sizeof(VALUE)*(size_t)(i));
12406 }
12407 calling->argc -= 1;
12408 (((reg_cfp)->sp) -= (((1))));
12409 }
12410 cc->me = rb_callable_method_entry_with_refinements(rb_class_of((VALUE)(calling->recv)), ci->mid, ((void *)0));
12411 ci->flag = (0x01 << VM_CALL_FCALL_bit) | (0x01 << VM_CALL_OPT_SEND_bit);
12412 return vm_call_method(ec, reg_cfp, calling, ci, cc);
12413}
12414static inline VALUE vm_invoke_block(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, VALUE block_handler);
12415__attribute__ ((__noinline__)) static VALUE vm_invoke_block_opt_call(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, VALUE block_handler);
12416static VALUE
12417vm_invoke_block_opt_call(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp,
12418 struct rb_calling_info *calling, const struct rb_call_info *ci, VALUE block_handler)
12419{
12420 int argc = calling->argc;
12421 if (argc > 0) memmove((&(*(((((reg_cfp)->sp)))-(argc)-1))), (&(*(((((reg_cfp)->sp)))-(argc-1)-1))), sizeof(VALUE)*(size_t)(argc));
12422 (((reg_cfp)->sp) -= (((1))));
12423 return vm_invoke_block(ec, reg_cfp, calling, ci, block_handler);
12424}
12425static VALUE
12426vm_call_opt_call(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
12427{
12428 VALUE procval = calling->recv;
12429 return vm_invoke_block_opt_call(ec, reg_cfp, calling, ci, VM_BH_FROM_PROC(procval));
12430}
12431static VALUE
12432vm_call_opt_block_call(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
12433{
12434 VALUE block_handler = VM_ENV_BLOCK_HANDLER(VM_CF_LEP(reg_cfp));
12435 if (((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_CALL)]&((1 << 12))) == 0), 1)))) {
12436 return vm_invoke_block_opt_call(ec, reg_cfp, calling, ci, block_handler);
12437 }
12438 else {
12439 calling->recv = rb_vm_bh_to_procval(ec, block_handler);
12440 vm_search_method(ci, cc, calling->recv);
12441 return vm_call_general(ec, reg_cfp, calling, ci, cc);
12442 }
12443}
12444static VALUE
12445vm_call_method_missing(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, const struct rb_call_info *orig_ci, struct rb_call_cache *orig_cc)
12446{
12447 VALUE *argv = (((((reg_cfp)->sp)))-(calling->argc));
12448 struct rb_call_info ci_entry;
12449 const struct rb_call_info *ci;
12450 struct rb_call_cache cc_entry, *cc;
12451 unsigned int argc;
12452 do { if ((__builtin_expect(!!(((orig_ci)->flag & (0x01 << VM_CALL_ARGS_SPLAT_bit))), 0))) vm_caller_setup_arg_splat((reg_cfp), (calling)); if ((__builtin_expect(!!(((orig_ci)->flag & (0x01 << VM_CALL_KWARG_bit))), 0))) vm_caller_setup_arg_kw((reg_cfp), (calling), (orig_ci)); } while (0);
12453 argc = calling->argc+1;
12454 ci_entry.flag = (0x01 << VM_CALL_FCALL_bit) | (0x01 << VM_CALL_OPT_SEND_bit);
12455 ci_entry.mid = idMethodMissing;
12456 ci_entry.orig_argc = argc;
12457 ci = &ci_entry;
12458 cc_entry = *orig_cc;
12459 cc_entry.me =
12460 rb_callable_method_entry_without_refinements(rb_class_of((VALUE)(calling->recv)),
12461 idMethodMissing, ((void *)0));
12462 cc = &cc_entry;
12463 calling->argc = argc;
12464 if ((__builtin_expect(!!(!(!(1/!!(sizeof(*((reg_cfp)->sp)) == sizeof(VALUE))) || !(1/!!(sizeof(*(reg_cfp)) == sizeof(rb_control_frame_t))) || ((rb_control_frame_t *)(((reg_cfp)->sp) + (1)) + 1) >= (reg_cfp))), 1))) {(void)0;} else vm_stackoverflow();
12465 if (argc > 1) {
12466 memmove((argv+1), (argv), sizeof(VALUE)*(size_t)(argc-1));
12467 }
12468 argv[0] = (rb_id2sym(orig_ci->mid));
12469 (((reg_cfp)->sp) += (((1))));
12470 ec->method_missing_reason = orig_cc->aux.method_missing_reason;
12471 return vm_call_method(ec, reg_cfp, calling, ci, cc);
12472}
12473static const rb_callable_method_entry_t *refined_method_callable_without_refinement(const rb_callable_method_entry_t *me);
12474static VALUE
12475vm_call_zsuper(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc, VALUE klass)
12476{
12477 klass = RCLASS_SUPER(klass);
12478 cc->me = klass ? rb_callable_method_entry(klass, ci->mid) : ((void *)0);
12479 if (!cc->me) {
12480 return vm_call_method_nome(ec, cfp, calling, ci, cc);
12481 }
12482 if (cc->me->def->type == VM_METHOD_TYPE_REFINED &&
12483 cc->me->def->body.refined.orig_me) {
12484 cc->me = refined_method_callable_without_refinement(cc->me);
12485 }
12486 return vm_call_method_each_type(ec, cfp, calling, ci, cc);
12487}
12488static inline VALUE
12489find_refinement(VALUE refinements, VALUE klass)
12490{
12491 if (!((VALUE)(refinements) != ((VALUE)RUBY_Qnil))) {
12492 return ((VALUE)RUBY_Qnil);
12493 }
12494 return rb_hash_lookup(refinements, klass);
12495}
12496__attribute__ ((__pure__)) static rb_control_frame_t * current_method_entry(const rb_execution_context_t *ec, rb_control_frame_t *cfp);
12497static rb_control_frame_t *
12498current_method_entry(const rb_execution_context_t *ec, rb_control_frame_t *cfp)
12499{
12500 rb_control_frame_t *top_cfp = cfp;
12501 if (cfp->iseq && cfp->iseq->body->type == ISEQ_TYPE_BLOCK) {
12502 const rb_iseq_t *local_iseq = cfp->iseq->body->local_iseq;
12503 do {
12504 cfp = ((cfp)+1);
12505 if (RUBY_VM_CONTROL_FRAME_STACK_OVERFLOW_P(ec, cfp)) {
12506 return top_cfp;
12507 }
12508 } while (cfp->iseq != local_iseq);
12509 }
12510 return cfp;
12511}
12512static VALUE
12513find_defined_class_by_owner(VALUE current_class, VALUE target_owner)
12514{
12515 VALUE klass = current_class;
12516 if (( ((RUBY_T_ICLASS) == RUBY_T_FIXNUM) ? (((int)(long)(klass))&RUBY_FIXNUM_FLAG) : ((RUBY_T_ICLASS) == RUBY_T_TRUE) ? ((klass) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_ICLASS) == RUBY_T_FALSE) ? ((klass) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_ICLASS) == RUBY_T_NIL) ? ((klass) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_ICLASS) == RUBY_T_UNDEF) ? ((klass) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_ICLASS) == RUBY_T_SYMBOL) ? ((((VALUE)(klass)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(klass) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(klass) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(klass))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_ICLASS) == RUBY_T_FLOAT) ? ( ((((int)(long)(klass))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(klass) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(klass) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(klass))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(klass) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(klass) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(klass))->flags & RUBY_T_MASK) == (RUBY_T_ICLASS))) && ((!(((VALUE)(klass) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(klass) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(klass))->flags & RUBY_T_MASK) != RUBY_T_NODE)?(((struct RBasic*)((klass)))->flags&((((VALUE)RUBY_FL_USER5)))):0)) klass = (((struct RBasic*)(klass))->klass);
12517 while (!(((VALUE)(klass) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) {
12518 VALUE owner = ( ((RUBY_T_ICLASS) == RUBY_T_FIXNUM) ? (((int)(long)(klass))&RUBY_FIXNUM_FLAG) : ((RUBY_T_ICLASS) == RUBY_T_TRUE) ? ((klass) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_ICLASS) == RUBY_T_FALSE) ? ((klass) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_ICLASS) == RUBY_T_NIL) ? ((klass) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_ICLASS) == RUBY_T_UNDEF) ? ((klass) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_ICLASS) == RUBY_T_SYMBOL) ? ((((VALUE)(klass)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(klass) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(klass) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(klass))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_ICLASS) == RUBY_T_FLOAT) ? ( ((((int)(long)(klass))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(klass) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(klass) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(klass))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(klass) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(klass) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(klass))->flags & RUBY_T_MASK) == (RUBY_T_ICLASS))) ? (((struct RBasic*)(klass))->klass) : klass;
12519 if (owner == target_owner) {
12520 return klass;
12521 }
12523 }
12524 return current_class;
12525}
12526static const rb_callable_method_entry_t *
12527aliased_callable_method_entry(const rb_callable_method_entry_t *me)
12528{
12529 const rb_method_entry_t *orig_me = me->def->body.alias.original_me;
12530 const rb_callable_method_entry_t *cme;
12531 if (orig_me->defined_class == 0) {
12532 VALUE defined_class = find_defined_class_by_owner(me->defined_class, orig_me->owner);
12533 ((void)0);
12534 cme = rb_method_entry_complement_defined_class(orig_me, me->called_id, defined_class);
12535 if (me->def->alias_count + me->def->complemented_count == 0) {
12536 rb_obj_write((VALUE)(me), (VALUE *)(&me->def->body.alias.original_me), (VALUE)(cme), "./vm_insnhelper.c", 2195);
12537 }
12538 else {
12540 rb_method_definition_create(VM_METHOD_TYPE_ALIAS, me->def->original_id);
12541 rb_method_definition_set((rb_method_entry_t *)me, def, (void *)cme);
12542 }
12543 }
12544 else {
12545 cme = (const rb_callable_method_entry_t *)orig_me;
12546 }
12547 ((void)0);
12548 return cme;
12549}
12550static const rb_callable_method_entry_t *
12551refined_method_callable_without_refinement(const rb_callable_method_entry_t *me)
12552{
12553 const rb_method_entry_t *orig_me = me->def->body.refined.orig_me;
12554 const rb_callable_method_entry_t *cme;
12555 if (orig_me->defined_class == 0) {
12556 cme = ((void *)0);
12558 }
12559 else {
12560 cme = (const rb_callable_method_entry_t *)orig_me;
12561 }
12562 ((void)0);
12563 if ((!(cme) || !(cme)->def || (cme)->def->type == VM_METHOD_TYPE_UNDEF)) {
12564 cme = ((void *)0);
12565 }
12566 return cme;
12567}
12568static VALUE
12569vm_call_method_each_type(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
12570{
12571 switch (cc->me->def->type) {
12572 case VM_METHOD_TYPE_ISEQ:
12573 do { if ((__builtin_expect(!!(1), 1))) ((cc)->call = (vm_call_iseq_setup)); } while (0);
12574 return vm_call_iseq_setup(ec, cfp, calling, ci, cc);
12575 case VM_METHOD_TYPE_NOTIMPLEMENTED:
12576 case VM_METHOD_TYPE_CFUNC:
12577 do { if ((__builtin_expect(!!(1), 1))) ((cc)->call = (vm_call_cfunc)); } while (0);
12578 return vm_call_cfunc(ec, cfp, calling, ci, cc);
12579 case VM_METHOD_TYPE_ATTRSET:
12580 do { if ((__builtin_expect(!!(((ci)->flag & (0x01 << VM_CALL_ARGS_SPLAT_bit))), 0))) vm_caller_setup_arg_splat((cfp), (calling)); if ((__builtin_expect(!!(((ci)->flag & (0x01 << VM_CALL_KWARG_bit))), 0))) vm_caller_setup_arg_kw((cfp), (calling), (ci)); } while (0);
12581 rb_check_arity(calling->argc, 1, 1);
12582 cc->aux.index = 0;
12583 do { if ((__builtin_expect(!!(!((ci->flag & (0x01 << VM_CALL_ARGS_SPLAT_bit)) || (ci->flag & (0x01 << VM_CALL_KWARG_bit)))), 1))) ((cc)->call = (vm_call_attrset)); } while (0);
12584 return vm_call_attrset(ec, cfp, calling, ci, cc);
12585 case VM_METHOD_TYPE_IVAR:
12586 do { if ((__builtin_expect(!!(((ci)->flag & (0x01 << VM_CALL_ARGS_SPLAT_bit))), 0))) vm_caller_setup_arg_splat((cfp), (calling)); if ((__builtin_expect(!!(((ci)->flag & (0x01 << VM_CALL_KWARG_bit))), 0))) vm_caller_setup_arg_kw((cfp), (calling), (ci)); } while (0);
12587 rb_check_arity(calling->argc, 0, 0);
12588 cc->aux.index = 0;
12589 do { if ((__builtin_expect(!!(!(ci->flag & (0x01 << VM_CALL_ARGS_SPLAT_bit))), 1))) ((cc)->call = (vm_call_ivar)); } while (0);
12590 return vm_call_ivar(ec, cfp, calling, ci, cc);
12591 case VM_METHOD_TYPE_MISSING:
12592 cc->aux.method_missing_reason = 0;
12593 do { if ((__builtin_expect(!!(1), 1))) ((cc)->call = (vm_call_method_missing)); } while (0);
12594 return vm_call_method_missing(ec, cfp, calling, ci, cc);
12595 case VM_METHOD_TYPE_BMETHOD:
12596 do { if ((__builtin_expect(!!(1), 1))) ((cc)->call = (vm_call_bmethod)); } while (0);
12597 return vm_call_bmethod(ec, cfp, calling, ci, cc);
12598 case VM_METHOD_TYPE_ALIAS:
12599 cc->me = aliased_callable_method_entry(cc->me);
12600 ((void)0);
12601 return vm_call_method_each_type(ec, cfp, calling, ci, cc);
12602 case VM_METHOD_TYPE_OPTIMIZED:
12603 switch (cc->me->def->body.optimize_type) {
12604 case OPTIMIZED_METHOD_TYPE_SEND:
12605 do { if ((__builtin_expect(!!(1), 1))) ((cc)->call = (vm_call_opt_send)); } while (0);
12606 return vm_call_opt_send(ec, cfp, calling, ci, cc);
12607 case OPTIMIZED_METHOD_TYPE_CALL:
12608 do { if ((__builtin_expect(!!(1), 1))) ((cc)->call = (vm_call_opt_call)); } while (0);
12609 return vm_call_opt_call(ec, cfp, calling, ci, cc);
12610 case OPTIMIZED_METHOD_TYPE_BLOCK_CALL:
12611 do { if ((__builtin_expect(!!(1), 1))) ((cc)->call = (vm_call_opt_block_call)); } while (0);
12612 return vm_call_opt_block_call(ec, cfp, calling, ci, cc);
12613 default:
12614 rb_bug("vm_call_method: unsupported optimized method type (%d)",
12615 cc->me->def->body.optimize_type);
12616 }
12617 case VM_METHOD_TYPE_UNDEF:
12618 break;
12619 case VM_METHOD_TYPE_ZSUPER:
12620 return vm_call_zsuper(ec, cfp, calling, ci, cc, ((((struct RClass*)(cc->me->defined_class))->ptr)->origin_));
12621 case VM_METHOD_TYPE_REFINED: {
12622 const rb_cref_t *cref = rb_vm_get_cref(cfp->ep);
12623 VALUE refinements = cref ? CREF_REFINEMENTS(cref) : ((VALUE)RUBY_Qnil);
12624 VALUE refinement;
12625 const rb_callable_method_entry_t *ref_me;
12626 refinement = find_refinement(refinements, cc->me->owner);
12627 if (!((VALUE)(refinement) != ((VALUE)RUBY_Qnil))) {
12628 goto no_refinement_dispatch;
12629 }
12630 ref_me = rb_callable_method_entry(refinement, ci->mid);
12631 if (ref_me) {
12632 if (cc->call == vm_call_super_method) {
12633 const rb_control_frame_t *top_cfp = current_method_entry(ec, cfp);
12634 const rb_callable_method_entry_t *top_me = rb_vm_frame_method_entry(top_cfp);
12635 if (top_me && rb_method_definition_eq(ref_me->def, top_me->def)) {
12636 goto no_refinement_dispatch;
12637 }
12638 }
12639 if (cc->me->def->type != VM_METHOD_TYPE_REFINED ||
12640 cc->me->def != ref_me->def) {
12641 cc->me = ref_me;
12642 }
12643 if (ref_me->def->type != VM_METHOD_TYPE_REFINED) {
12644 return vm_call_method(ec, cfp, calling, ci, cc);
12645 }
12646 }
12647 else {
12648 cc->me = ((void *)0);
12649 return vm_call_method_nome(ec, cfp, calling, ci, cc);
12650 }
12651 no_refinement_dispatch:
12652 if (cc->me->def->body.refined.orig_me) {
12653 cc->me = refined_method_callable_without_refinement(cc->me);
12654 }
12655 else {
12656 VALUE klass = RCLASS_SUPER(cc->me->defined_class);
12657 cc->me = klass ? rb_callable_method_entry(klass, ci->mid) : ((void *)0);
12658 }
12659 return vm_call_method(ec, cfp, calling, ci, cc);
12660 }
12661 }
12662 rb_bug("vm_call_method: unsupported method type (%d)", cc->me->def->type);
12663}
12664__attribute__ ((__noreturn__)) static void vm_raise_method_missing(rb_execution_context_t *ec, int argc, const VALUE *argv, VALUE obj, int call_status);
12665static VALUE
12666vm_call_method_nome(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
12667{
12668 const int stat = ci_missing_reason(ci);
12669 if (ci->mid == idMethodMissing) {
12670 rb_control_frame_t *reg_cfp = cfp;
12671 VALUE *argv = (((((reg_cfp)->sp)))-(calling->argc));
12672 vm_raise_method_missing(ec, calling->argc, argv, calling->recv, stat);
12673 }
12674 else {
12675 cc->aux.method_missing_reason = stat;
12676 do { if ((__builtin_expect(!!(1), 1))) ((cc)->call = (vm_call_method_missing)); } while (0);
12677 return vm_call_method_missing(ec, cfp, calling, ci, cc);
12678 }
12679}
12680static inline VALUE
12681vm_call_method(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
12682{
12683 ((void)0);
12684 if (cc->me != ((void *)0)) {
12685 switch ((rb_method_visibility_t)(((cc->me)->flags & (((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5))) >> ((((VALUE)RUBY_FL_USHIFT) + 4)+0))) {
12686 case METHOD_VISI_PUBLIC:
12687 return vm_call_method_each_type(ec, cfp, calling, ci, cc);
12688 case METHOD_VISI_PRIVATE:
12689 if (!(ci->flag & (0x01 << VM_CALL_FCALL_bit))) {
12690 enum method_missing_reason stat = MISSING_PRIVATE;
12691 if (ci->flag & (0x01 << VM_CALL_VCALL_bit)) stat |= MISSING_VCALL;
12692 cc->aux.method_missing_reason = stat;
12693 do { if ((__builtin_expect(!!(1), 1))) ((cc)->call = (vm_call_method_missing)); } while (0);
12694 return vm_call_method_missing(ec, cfp, calling, ci, cc);
12695 }
12696 return vm_call_method_each_type(ec, cfp, calling, ci, cc);
12697 case METHOD_VISI_PROTECTED:
12698 if (!(ci->flag & (0x01 << VM_CALL_OPT_SEND_bit))) {
12699 if (!rb_obj_is_kind_of(cfp->self, cc->me->defined_class)) {
12700 cc->aux.method_missing_reason = MISSING_PROTECTED;
12701 return vm_call_method_missing(ec, cfp, calling, ci, cc);
12702 }
12703 else {
12704 struct rb_call_cache cc_entry;
12705 cc_entry = *cc;
12706 cc = &cc_entry;
12707 ((void)0);
12708 return vm_call_method_each_type(ec, cfp, calling, ci, cc);
12709 }
12710 }
12711 return vm_call_method_each_type(ec, cfp, calling, ci, cc);
12712 default:
12713 rb_bug("unreachable");
12714 }
12715 }
12716 else {
12717 return vm_call_method_nome(ec, cfp, calling, ci, cc);
12718 }
12719}
12720static VALUE
12721vm_call_general(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
12722{
12723 return vm_call_method(ec, reg_cfp, calling, ci, cc);
12724}
12725static VALUE
12726vm_call_super_method(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
12727{
12728 if (cc->call != vm_call_super_method) rb_bug("bug");
12729 return vm_call_method(ec, reg_cfp, calling, ci, cc);
12730}
12731static inline VALUE
12732vm_search_normal_superclass(VALUE klass)
12733{
12734 if ((int)(((struct RBasic*)(klass))->flags & RUBY_T_MASK) == RUBY_T_ICLASS &&
12735 ((!(((VALUE)(((struct RBasic*)(klass))->klass) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(((struct RBasic*)(klass))->klass) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(((struct RBasic*)(klass))->klass))->flags & RUBY_T_MASK) != RUBY_T_NODE)?(((struct RBasic*)((((struct RBasic*)(klass))->klass)))->flags&((RMODULE_IS_REFINEMENT))):0)) {
12736 klass = ((struct RBasic*)(klass))->klass;
12737 }
12738 klass = ((((struct RClass*)(klass))->ptr)->origin_);
12739 return RCLASS_SUPER(klass);
12740}
12741__attribute__ ((__noreturn__)) static void vm_super_outside(void);
12742static void
12743vm_super_outside(void)
12744{
12745 rb_raise(rb_eNoMethodError, "super called outside of method");
12746}
12747static void
12748vm_search_super_method(const rb_execution_context_t *ec, rb_control_frame_t *reg_cfp,
12749 struct rb_calling_info *calling, struct rb_call_info *ci, struct rb_call_cache *cc)
12750{
12751 VALUE current_defined_class, klass;
12752 const rb_callable_method_entry_t *me = rb_vm_frame_method_entry(reg_cfp);
12753 if (!me) {
12754 vm_super_outside();
12755 }
12756 current_defined_class = me->defined_class;
12757 if (!!((VALUE)(((((struct RClass*)(current_defined_class))->ptr)->refined_class)) != ((VALUE)RUBY_Qnil))) {
12758 current_defined_class = ((((struct RClass*)(current_defined_class))->ptr)->refined_class);
12759 }
12760 if ((int)(((struct RBasic*)(current_defined_class))->flags & RUBY_T_MASK) != RUBY_T_MODULE &&
12761 (int)(((struct RBasic*)(current_defined_class))->flags & RUBY_T_MASK) != RUBY_T_ICLASS &&
12762 !((!(((VALUE)(current_defined_class) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(current_defined_class) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(current_defined_class))->flags & RUBY_T_MASK) != RUBY_T_NODE)?(((struct RBasic*)((current_defined_class)))->flags&((RMODULE_INCLUDED_INTO_REFINEMENT))):0) &&
12763 !rb_obj_is_kind_of(calling->recv, current_defined_class)) {
12764 VALUE m = ( ((RUBY_T_ICLASS) == RUBY_T_FIXNUM) ? (((int)(long)(current_defined_class))&RUBY_FIXNUM_FLAG) : ((RUBY_T_ICLASS) == RUBY_T_TRUE) ? ((current_defined_class) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_ICLASS) == RUBY_T_FALSE) ? ((current_defined_class) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_ICLASS) == RUBY_T_NIL) ? ((current_defined_class) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_ICLASS) == RUBY_T_UNDEF) ? ((current_defined_class) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_ICLASS) == RUBY_T_SYMBOL) ? ((((VALUE)(current_defined_class)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(current_defined_class) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(current_defined_class) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(current_defined_class))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_ICLASS) == RUBY_T_FLOAT) ? ( ((((int)(long)(current_defined_class))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(current_defined_class) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(current_defined_class) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(current_defined_class))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(current_defined_class) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(current_defined_class) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(current_defined_class))->flags & RUBY_T_MASK) == (RUBY_T_ICLASS))) ?
12765 ((struct RBasic*)(current_defined_class))->klass : current_defined_class;
12766 rb_raise(rb_eTypeError,
12767 "self has wrong type to call super in this context: "
12768 "%""l""i" "\v"" (expected %""l""i" "\v"")",
12769 rb_obj_class(calling->recv), m);
12770 }
12771 if (me->def->type == VM_METHOD_TYPE_BMETHOD && (ci->flag & (0x01 << VM_CALL_ZSUPER_bit))) {
12772 rb_raise(rb_eRuntimeError,
12773 "implicit argument passing of super from method defined"
12774 " by define_method() is not supported."
12775 " Specify all arguments explicitly.");
12776 }
12777 ci->mid = me->def->original_id;
12778 klass = vm_search_normal_superclass(me->defined_class);
12779 if (!klass) {
12780 cc->aux.method_missing_reason = MISSING_SUPER;
12781 do { if ((__builtin_expect(!!(1), 1))) ((cc)->call = (vm_call_method_missing)); } while (0);
12782 }
12783 else {
12784 cc->me = rb_callable_method_entry(klass, ci->mid);
12785 do { if ((__builtin_expect(!!(1), 1))) ((cc)->call = (vm_call_super_method)); } while (0);
12786 }
12787}
12788static inline int
12789block_proc_is_lambda(const VALUE procval)
12790{
12791 rb_proc_t *proc;
12792 if (procval) {
12793 (((proc)) = (rb_proc_t*)(((struct RData*)(((procval))))->data));
12794 return proc->is_lambda;
12795 }
12796 else {
12797 return 0;
12798 }
12799}
12800static VALUE
12801vm_yield_with_cfunc(rb_execution_context_t *ec,
12802 const struct rb_captured_block *captured,
12803 VALUE self, int argc, const VALUE *argv, VALUE block_handler,
12805{
12806 int is_lambda = 0;
12807 VALUE val, arg, blockarg;
12808 const struct vm_ifunc *ifunc = captured->code.ifunc;
12809 if (is_lambda) {
12810 arg = rb_ary_new_from_values(argc, argv);
12811 }
12812 else if (argc == 0) {
12813 arg = ((VALUE)RUBY_Qnil);
12814 }
12815 else {
12816 arg = argv[0];
12817 }
12818 blockarg = rb_vm_bh_to_procval(ec, block_handler);
12819 vm_push_frame(ec, (const rb_iseq_t *)captured->code.ifunc,
12820 VM_FRAME_MAGIC_IFUNC | VM_FRAME_FLAG_CFRAME |
12821 (me ? VM_FRAME_FLAG_BMETHOD : 0),
12822 self,
12823 ((VALUE)((captured->ep)) | (0x01)),
12824 (VALUE)me,
12825 0, ec->cfp->sp, 0, 0);
12826 val = (*ifunc->func)(arg, ifunc->data, argc, argv, blockarg);
12827 rb_vm_pop_frame(ec);
12828 return val;
12829}
12830static VALUE
12831vm_yield_with_symbol(rb_execution_context_t *ec, VALUE symbol, int argc, const VALUE *argv, VALUE block_handler)
12832{
12833 return rb_sym_proc_call((rb_sym2id(symbol)), argc, argv, rb_vm_bh_to_procval(ec, block_handler));
12834}
12835static inline int
12836vm_callee_setup_block_arg_arg0_splat(rb_control_frame_t *cfp, const rb_iseq_t *iseq, VALUE *argv, VALUE ary)
12837{
12838 int i;
12839 long len = rb_array_len(ary);
12840 if ((__builtin_expect(!!(!(!(1/!!(sizeof(*((cfp)->sp)) == sizeof(VALUE))) || !(1/!!(sizeof(*(cfp)) == sizeof(rb_control_frame_t))) || ((rb_control_frame_t *)(((cfp)->sp) + (iseq->body->param.lead_num)) + 1) >= (cfp))), 1))) {(void)0;} else vm_stackoverflow();
12841 for (i=0; i<len && i<iseq->body->param.lead_num; i++) {
12842 argv[i] = (rb_array_const_ptr_transient(ary)[i]);
12843 }
12844 return i;
12845}
12846static inline VALUE
12847vm_callee_setup_block_arg_arg0_check(VALUE *argv)
12848{
12849 VALUE ary, arg0 = argv[0];
12850 ary = rb_check_array_type(arg0);
12851 ((void)0);
12852 return ary;
12853}
12854static int
12855vm_callee_setup_block_arg(rb_execution_context_t *ec, struct rb_calling_info *calling, const struct rb_call_info *ci, const rb_iseq_t *iseq, VALUE *argv, const enum arg_setup_type arg_setup_type)
12856{
12857 if (rb_simple_iseq_p(iseq)) {
12858 rb_control_frame_t *cfp = ec->cfp;
12859 VALUE arg0;
12860 do { if ((__builtin_expect(!!(((ci)->flag & (0x01 << VM_CALL_ARGS_SPLAT_bit))), 0))) vm_caller_setup_arg_splat((cfp), (calling)); if ((__builtin_expect(!!(((ci)->flag & (0x01 << VM_CALL_KWARG_bit))), 0))) vm_caller_setup_arg_kw((cfp), (calling), (ci)); } while (0);
12861 if (arg_setup_type == arg_setup_block &&
12862 calling->argc == 1 &&
12863 iseq->body->param.flags.has_lead &&
12864 !iseq->body->param.flags.ambiguous_param0 &&
12865 !!((VALUE)(arg0 = vm_callee_setup_block_arg_arg0_check(argv)) != ((VALUE)RUBY_Qnil))) {
12866 calling->argc = vm_callee_setup_block_arg_arg0_splat(cfp, iseq, argv, arg0);
12867 }
12868 if (calling->argc != iseq->body->param.lead_num) {
12869 if (arg_setup_type == arg_setup_block) {
12870 if (calling->argc < iseq->body->param.lead_num) {
12871 int i;
12872 if ((__builtin_expect(!!(!(!(1/!!(sizeof(*((cfp)->sp)) == sizeof(VALUE))) || !(1/!!(sizeof(*(cfp)) == sizeof(rb_control_frame_t))) || ((rb_control_frame_t *)(((cfp)->sp) + (iseq->body->param.lead_num)) + 1) >= (cfp))), 1))) {(void)0;} else vm_stackoverflow();
12873 for (i=calling->argc; i<iseq->body->param.lead_num; i++) argv[i] = ((VALUE)RUBY_Qnil);
12874 calling->argc = iseq->body->param.lead_num;
12875 }
12876 else if (calling->argc > iseq->body->param.lead_num) {
12877 calling->argc = iseq->body->param.lead_num;
12878 }
12879 }
12880 else {
12881 argument_arity_error(ec, iseq, calling->argc, iseq->body->param.lead_num, iseq->body->param.lead_num);
12882 }
12883 }
12884 return 0;
12885 }
12886 else {
12887 return setup_parameters_complex(ec, iseq, calling, ci, argv, arg_setup_type);
12888 }
12889}
12890static int
12891vm_yield_setup_args(rb_execution_context_t *ec, const rb_iseq_t *iseq, const int argc, VALUE *argv, VALUE block_handler, enum arg_setup_type arg_setup_type)
12892{
12893 struct rb_calling_info calling_entry, *calling;
12894 struct rb_call_info ci_entry, *ci;
12895 calling = &calling_entry;
12896 calling->argc = argc;
12897 calling->block_handler = block_handler;
12898 ci_entry.flag = 0;
12899 ci = &ci_entry;
12900 return vm_callee_setup_block_arg(ec, calling, ci, iseq, argv, arg_setup_type);
12901}
12902static VALUE
12903vm_invoke_iseq_block(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp,
12904 struct rb_calling_info *calling, const struct rb_call_info *ci,
12905 int is_lambda, const struct rb_captured_block *captured)
12906{
12907 const rb_iseq_t *iseq = rb_iseq_check(captured->code.iseq);
12908 const int arg_size = iseq->body->param.size;
12909 VALUE * const rsp = ((((reg_cfp)->sp))) - calling->argc;
12910 int opt_pc = vm_callee_setup_block_arg(ec, calling, ci, iseq, rsp, is_lambda ? arg_setup_method : arg_setup_block);
12911 (((reg_cfp)->sp) = (((rsp))));
12912 vm_push_frame(ec, iseq,
12913 VM_FRAME_MAGIC_BLOCK | (is_lambda ? VM_FRAME_FLAG_LAMBDA : 0),
12914 captured->self,
12915 ((VALUE)((captured->ep)) | (0x01)), 0,
12916 iseq->body->iseq_encoded + opt_pc,
12917 rsp + arg_size,
12918 iseq->body->local_table_size - arg_size, iseq->body->stack_max);
12919 return ((VALUE)RUBY_Qundef);
12920}
12921static VALUE
12922vm_invoke_symbol_block(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp,
12923 struct rb_calling_info *calling, const struct rb_call_info *ci,
12924 VALUE symbol)
12925{
12926 VALUE val;
12927 int argc;
12928 do { if ((__builtin_expect(!!(((ci)->flag & (0x01 << VM_CALL_ARGS_SPLAT_bit))), 0))) vm_caller_setup_arg_splat((ec->cfp), (calling)); if ((__builtin_expect(!!(((ci)->flag & (0x01 << VM_CALL_KWARG_bit))), 0))) vm_caller_setup_arg_kw((ec->cfp), (calling), (ci)); } while (0);
12929 argc = calling->argc;
12930 val = vm_yield_with_symbol(ec, symbol, argc, (((((reg_cfp)->sp)))-(argc)), calling->block_handler);
12931 ((((reg_cfp)->sp) -= (((argc)))));
12932 return val;
12933}
12934static VALUE
12935vm_invoke_ifunc_block(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp,
12936 struct rb_calling_info *calling, const struct rb_call_info *ci,
12937 const struct rb_captured_block *captured)
12938{
12939 VALUE val;
12940 int argc;
12941 do { if ((__builtin_expect(!!(((ci)->flag & (0x01 << VM_CALL_ARGS_SPLAT_bit))), 0))) vm_caller_setup_arg_splat((ec->cfp), (calling)); if ((__builtin_expect(!!(((ci)->flag & (0x01 << VM_CALL_KWARG_bit))), 0))) vm_caller_setup_arg_kw((ec->cfp), (calling), (ci)); } while (0);
12942 argc = calling->argc;
12943 val = vm_yield_with_cfunc(ec, captured, captured->self, argc, (((((reg_cfp)->sp)))-(argc)), calling->block_handler, ((void *)0));
12944 ((((reg_cfp)->sp) -= (((argc)))));
12945 return val;
12946}
12947static VALUE
12948vm_proc_to_block_handler(VALUE procval)
12949{
12950 const struct rb_block *block = vm_proc_block(procval);
12951 switch (vm_block_type(block)) {
12952 case block_type_iseq:
12953 return VM_BH_FROM_ISEQ_BLOCK(&block->as.captured);
12954 case block_type_ifunc:
12955 return VM_BH_FROM_IFUNC_BLOCK(&block->as.captured);
12956 case block_type_symbol:
12957 return VM_BH_FROM_SYMBOL(block->as.symbol);
12958 case block_type_proc:
12959 return VM_BH_FROM_PROC(block->as.proc);
12960 }
12961 __builtin_unreachable();
12962 return ((VALUE)RUBY_Qundef);
12963}
12964static inline VALUE
12965vm_invoke_block(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp,
12966 struct rb_calling_info *calling, const struct rb_call_info *ci, VALUE block_handler)
12967{
12968 int is_lambda = 0;
12969 again:
12970 switch (vm_block_handler_type(block_handler)) {
12971 case block_handler_type_iseq:
12972 {
12973 const struct rb_captured_block *captured = VM_BH_TO_ISEQ_BLOCK(block_handler);
12974 return vm_invoke_iseq_block(ec, reg_cfp, calling, ci, is_lambda, captured);
12975 }
12976 case block_handler_type_ifunc:
12977 {
12978 const struct rb_captured_block *captured = VM_BH_TO_IFUNC_BLOCK(block_handler);
12979 return vm_invoke_ifunc_block(ec, reg_cfp, calling, ci, captured);
12980 }
12981 case block_handler_type_proc:
12982 is_lambda = block_proc_is_lambda(VM_BH_TO_PROC(block_handler));
12983 block_handler = vm_proc_to_block_handler(VM_BH_TO_PROC(block_handler));
12984 goto again;
12985 case block_handler_type_symbol:
12986 return vm_invoke_symbol_block(ec, reg_cfp, calling, ci, VM_BH_TO_SYMBOL(block_handler));
12987 }
12988 __builtin_unreachable();
12989 return ((VALUE)RUBY_Qnil);
12990}
12991static VALUE
12992vm_make_proc_with_iseq(const rb_iseq_t *blockiseq)
12993{
12994 const rb_execution_context_t *ec = rb_current_execution_context();
12995 const rb_control_frame_t *cfp = rb_vm_get_ruby_level_next_cfp(ec, ec->cfp);
12996 struct rb_captured_block *captured;
12997 if (cfp == 0) {
12998 rb_bug("vm_make_proc_with_iseq: unreachable");
12999 }
13000 captured = VM_CFP_TO_CAPTURED_BLOCK(cfp);
13001 captured->code.iseq = blockiseq;
13002 return rb_vm_make_proc(ec, captured, rb_cProc);
13003}
13004static VALUE
13005vm_once_exec(VALUE iseq)
13006{
13007 VALUE proc = vm_make_proc_with_iseq((rb_iseq_t *)iseq);
13008 return rb_proc_call_with_block(proc, 0, 0, ((VALUE)RUBY_Qnil));
13009}
13010static VALUE
13011vm_once_clear(VALUE data)
13012{
13013 union iseq_inline_storage_entry *is = (union iseq_inline_storage_entry *)data;
13014 is->once.running_thread = ((void *)0);
13015 return ((VALUE)RUBY_Qnil);
13016}static inline
13018rb_vm_opt_struct_aref(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp)
13019{
13020 (*(((((reg_cfp)->sp)))-(0)-1)) = rb_struct_aref((((((reg_cfp)))->self)), (*(((((reg_cfp)->sp)))-(0)-1)));
13021 return reg_cfp;
13022}static inline
13024rb_vm_opt_struct_aset(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp)
13025{
13026 rb_struct_aset((((((reg_cfp)))->self)), (*(((((reg_cfp)->sp)))-(0)-1)), (*(((((reg_cfp)->sp)))-(1)-1)));
13027 return reg_cfp;
13028}
13029static enum defined_type
13030check_respond_to_missing(VALUE obj, VALUE v)
13031{
13032 VALUE args[2];
13033 VALUE r;
13034 args[0] = obj; args[1] = ((VALUE)RUBY_Qfalse);
13035 r = rb_check_funcall(v, idRespond_to_missing, 2, args);
13036 if (r != ((VALUE)RUBY_Qundef) && !(((VALUE)(r) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) {
13037 return DEFINED_METHOD;
13038 }
13039 else {
13040 return DEFINED_NOT_DEFINED;
13041 }
13042}
13043static VALUE
13044vm_defined(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, rb_num_t op_type, VALUE obj, VALUE needstr, VALUE v)
13045{
13046 VALUE klass;
13047 enum defined_type expr_type = DEFINED_NOT_DEFINED;
13048 enum defined_type type = (enum defined_type)op_type;
13049 switch (type) {
13050 case DEFINED_IVAR:
13051 if (rb_ivar_defined((((((reg_cfp)))->self)), (rb_sym2id(obj)))) {
13052 expr_type = DEFINED_IVAR;
13053 }
13054 break;
13055 case DEFINED_IVAR2:
13056 klass = vm_get_cbase(((((reg_cfp)->ep))));
13057 break;
13058 case DEFINED_GVAR:
13059 if (rb_gvar_defined(rb_global_entry((rb_sym2id(obj))))) {
13060 expr_type = DEFINED_GVAR;
13061 }
13062 break;
13063 case DEFINED_CVAR: {
13064 const rb_cref_t *cref = rb_vm_get_cref(((((reg_cfp)->ep))));
13065 klass = vm_get_cvar_base(cref, (((reg_cfp))));
13066 if (rb_cvar_defined(klass, (rb_sym2id(obj)))) {
13067 expr_type = DEFINED_CVAR;
13068 }
13069 break;
13070 }
13071 case DEFINED_CONST:
13072 klass = v;
13073 if (vm_get_ev_const(ec, klass, (rb_sym2id(obj)), 1)) {
13074 expr_type = DEFINED_CONST;
13075 }
13076 break;
13077 case DEFINED_FUNC:
13078 klass = rb_class_of((VALUE)(v));
13079 if (rb_method_boundp(klass, (rb_sym2id(obj)), 0)) {
13080 expr_type = DEFINED_METHOD;
13081 }
13082 else {
13083 expr_type = check_respond_to_missing(obj, v);
13084 }
13085 break;
13086 case DEFINED_METHOD:{
13087 VALUE klass = rb_class_of((VALUE)(v));
13088 const rb_method_entry_t *me = rb_method_entry(klass, (rb_sym2id(obj)));
13089 if (me) {
13090 switch ((rb_method_visibility_t)(((me)->flags & (((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5))) >> ((((VALUE)RUBY_FL_USHIFT) + 4)+0))) {
13091 case METHOD_VISI_PRIVATE:
13092 break;
13093 case METHOD_VISI_PROTECTED:
13094 if (!rb_obj_is_kind_of((((((reg_cfp)))->self)), rb_class_real(klass))) {
13095 break;
13096 }
13097 case METHOD_VISI_PUBLIC:
13098 expr_type = DEFINED_METHOD;
13099 break;
13100 default:
13101 rb_bug("vm_defined: unreachable: %u", (unsigned int)(rb_method_visibility_t)(((me)->flags & (((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5))) >> ((((VALUE)RUBY_FL_USHIFT) + 4)+0)));
13102 }
13103 }
13104 else {
13105 expr_type = check_respond_to_missing(obj, v);
13106 }
13107 break;
13108 }
13109 case DEFINED_YIELD:
13110 if (((VM_EP_LEP(((((reg_cfp)->ep)))))[(-1)]) != 0) {
13111 expr_type = DEFINED_YIELD;
13112 }
13113 break;
13114 case DEFINED_ZSUPER:
13115 {
13116 const rb_callable_method_entry_t *me = rb_vm_frame_method_entry((((reg_cfp))));
13117 if (me) {
13118 VALUE klass = vm_search_normal_superclass(me->defined_class);
13119 ID id = me->def->original_id;
13120 if (rb_method_boundp(klass, id, 0)) {
13121 expr_type = DEFINED_ZSUPER;
13122 }
13123 }
13124 }
13125 break;
13126 case DEFINED_REF:{
13127 if (vm_getspecial(ec, (VM_EP_LEP(((((reg_cfp)->ep))))), ((VALUE)RUBY_Qfalse), ((int)rb_fix2int((VALUE)(obj)))) != ((VALUE)RUBY_Qnil)) {
13128 expr_type = DEFINED_GVAR;
13129 }
13130 break;
13131 }
13132 default:
13133 rb_bug("unimplemented defined? type (VM)");
13134 break;
13135 }
13136 if (expr_type != 0) {
13137 if (needstr != ((VALUE)RUBY_Qfalse)) {
13138 return rb_iseq_defined_string(expr_type);
13139 }
13140 else {
13141 return ((VALUE)RUBY_Qtrue);
13142 }
13143 }
13144 else {
13145 return ((VALUE)RUBY_Qnil);
13146 }
13147}
13148static const VALUE *
13149vm_get_ep(const VALUE *const reg_ep, rb_num_t lv)
13150{
13151 rb_num_t i;
13152 const VALUE *ep = reg_ep;
13153 for (i = 0; i < lv; i++) {
13154 ep = ((VALUE *)((ep)[(-1)] & ~0x03));
13155 }
13156 return ep;
13157}
13158static VALUE
13159vm_get_special_object(const VALUE *const reg_ep,
13160 enum vm_special_object_type type)
13161{
13162 switch (type) {
13163 case VM_SPECIAL_OBJECT_VMCORE:
13164 return rb_mRubyVMFrozenCore;
13165 case VM_SPECIAL_OBJECT_CBASE:
13166 return vm_get_cbase(reg_ep);
13167 case VM_SPECIAL_OBJECT_CONST_BASE:
13168 return vm_get_const_base(reg_ep);
13169 default:
13170 rb_bug("putspecialobject insn: unknown value_type %d", type);
13171 }
13172}
13173static void
13174vm_freezestring(VALUE str, VALUE debug)
13175{
13176 if (!!((VALUE)(debug) != ((VALUE)RUBY_Qnil))) {
13177 rb_ivar_set(str, id_debug_created_info, debug);
13178 }
13179 rb_str_freeze(str);
13180}
13181static VALUE
13182vm_concat_array(VALUE ary1, VALUE ary2st)
13183{
13184 const VALUE ary2 = ary2st;
13185 VALUE tmp1 = rb_check_to_array(ary1);
13186 VALUE tmp2 = rb_check_to_array(ary2);
13187 if (!((VALUE)(tmp1) != ((VALUE)RUBY_Qnil))) {
13188 tmp1 = __extension__ ({ const VALUE args_to_new_ary[] = {ary1}; if (__builtin_constant_p(1)) { __extension__ _Static_assert(((int)(sizeof(args_to_new_ary) / sizeof((args_to_new_ary)[0]))) == (1), "rb_ary_new_from_args" ": " "numberof(args_to_new_ary) == (1)"); } rb_ary_new_from_values(((int)(sizeof(args_to_new_ary) / sizeof((args_to_new_ary)[0]))), args_to_new_ary); });
13189 }
13190 if (!((VALUE)(tmp2) != ((VALUE)RUBY_Qnil))) {
13191 tmp2 = __extension__ ({ const VALUE args_to_new_ary[] = {ary2}; if (__builtin_constant_p(1)) { __extension__ _Static_assert(((int)(sizeof(args_to_new_ary) / sizeof((args_to_new_ary)[0]))) == (1), "rb_ary_new_from_args" ": " "numberof(args_to_new_ary) == (1)"); } rb_ary_new_from_values(((int)(sizeof(args_to_new_ary) / sizeof((args_to_new_ary)[0]))), args_to_new_ary); });
13192 }
13193 if (tmp1 == ary1) {
13194 tmp1 = rb_ary_dup(ary1);
13195 }
13196 return rb_ary_concat(tmp1, tmp2);
13197}
13198static VALUE
13199vm_splat_array(VALUE flag, VALUE ary)
13200{
13201 VALUE tmp = rb_check_to_array(ary);
13202 if (!((VALUE)(tmp) != ((VALUE)RUBY_Qnil))) {
13203 return __extension__ ({ const VALUE args_to_new_ary[] = {ary}; if (__builtin_constant_p(1)) { __extension__ _Static_assert(((int)(sizeof(args_to_new_ary) / sizeof((args_to_new_ary)[0]))) == (1), "rb_ary_new_from_args" ": " "numberof(args_to_new_ary) == (1)"); } rb_ary_new_from_values(((int)(sizeof(args_to_new_ary) / sizeof((args_to_new_ary)[0]))), args_to_new_ary); });
13204 }
13205 else if (!(((VALUE)(flag) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) {
13206 return rb_ary_dup(tmp);
13207 }
13208 else {
13209 return tmp;
13210 }
13211}
13212static VALUE
13213vm_check_match(rb_execution_context_t *ec, VALUE target, VALUE pattern, rb_num_t flag)
13214{
13215 enum vm_check_match_type type = ((int)flag) & 0x03;
13216 if (flag & 0x04) {
13217 long i;
13218 const long n = rb_array_len(pattern);
13219 for (i = 0; i < n; i++) {
13220 VALUE v = (rb_array_const_ptr_transient(pattern)[i]);
13221 VALUE c = check_match(ec, v, target, type);
13222 if (!(((VALUE)(c) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) {
13223 return c;
13224 }
13225 }
13226 return ((VALUE)RUBY_Qfalse);
13227 }
13228 else {
13229 return check_match(ec, pattern, target, type);
13230 }
13231}
13232static VALUE
13233vm_check_keyword(lindex_t bits, lindex_t idx, const VALUE *ep)
13234{
13235 const VALUE kw_bits = *(ep - bits);
13236 if ((((int)(long)(kw_bits))&RUBY_FIXNUM_FLAG)) {
13237 unsigned int b = (unsigned int)((unsigned long)((long)(((long)(kw_bits))>>(int)(1))));
13238 if ((idx < (32-1)) && (b & (0x01 << idx)))
13239 return ((VALUE)RUBY_Qfalse);
13240 }
13241 else {
13242 ((void)0);
13243 if (rb_hash_has_key(kw_bits, (((VALUE)(idx))<<1 | RUBY_FIXNUM_FLAG))) return ((VALUE)RUBY_Qfalse);
13244 }
13245 return ((VALUE)RUBY_Qtrue);
13246}
13247static void
13248vm_dtrace(rb_event_flag_t flag, rb_execution_context_t *ec)
13249{
13250 if (0 ||
13251 0 ||
13252 0 ||
13253 0) {
13254 switch (flag) {
13255 case 0x0008:
13256 do { if ((__builtin_expect(!!(0), 0))) { struct ruby_dtrace_method_hook_args args; if (rb_dtrace_setup(ec, 0, 0, &args)) { do {} while (0); } } } while (0);
13257 return;
13258 case 0x0020:
13259 do { if ((__builtin_expect(!!(0), 0))) { struct ruby_dtrace_method_hook_args args; if (rb_dtrace_setup(ec, 0, 0, &args)) { do {} while (0); } } } while (0);
13260 return;
13261 case 0x0010:
13262 do { if ((__builtin_expect(!!(0), 0))) { struct ruby_dtrace_method_hook_args args; if (rb_dtrace_setup(ec, 0, 0, &args)) { do {} while (0); } } } while (0);
13263 return;
13264 case 0x0040:
13265 do { if ((__builtin_expect(!!(0), 0))) { struct ruby_dtrace_method_hook_args args; if (rb_dtrace_setup(ec, 0, 0, &args)) { do {} while (0); } } } while (0);
13266 return;
13267 }
13268 }
13269}
13270static VALUE
13271vm_const_get_under(ID id, rb_num_t flags, VALUE cbase)
13272{
13273 VALUE ns;
13274 if ((ns = vm_search_const_defined_class(cbase, id)) == 0) {
13275 return ns;
13276 }
13277 else if (((flags) & 0x08)) {
13278 return rb_public_const_get_at(ns, id);
13279 }
13280 else {
13281 return rb_const_get_at(ns, id);
13282 }
13283}
13284static VALUE
13285vm_check_if_class(ID id, rb_num_t flags, VALUE super, VALUE klass)
13286{
13287 if (!( ((RUBY_T_CLASS) == RUBY_T_FIXNUM) ? (((int)(long)(klass))&RUBY_FIXNUM_FLAG) : ((RUBY_T_CLASS) == RUBY_T_TRUE) ? ((klass) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_CLASS) == RUBY_T_FALSE) ? ((klass) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_CLASS) == RUBY_T_NIL) ? ((klass) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_CLASS) == RUBY_T_UNDEF) ? ((klass) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_CLASS) == RUBY_T_SYMBOL) ? ((((VALUE)(klass)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(klass) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(klass) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(klass))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_CLASS) == RUBY_T_FLOAT) ? ( ((((int)(long)(klass))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(klass) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(klass) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(klass))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(klass) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(klass) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(klass))->flags & RUBY_T_MASK) == (RUBY_T_CLASS)))) {
13288 rb_raise(rb_eTypeError, "%""l""i" "\v"" is not a class", rb_id2str(id));
13289 }
13290 else if (((flags) & 0x10)) {
13291 VALUE tmp = rb_class_real(RCLASS_SUPER(klass));
13292 if (tmp != super) {
13293 rb_raise(rb_eTypeError,
13294 "superclass mismatch for class %""l""i" "\v""",
13295 rb_id2str(id));
13296 }
13297 else {
13298 return klass;
13299 }
13300 }
13301 else {
13302 return klass;
13303 }
13304}
13305static VALUE
13306vm_check_if_module(ID id, VALUE mod)
13307{
13308 if (!( ((RUBY_T_MODULE) == RUBY_T_FIXNUM) ? (((int)(long)(mod))&RUBY_FIXNUM_FLAG) : ((RUBY_T_MODULE) == RUBY_T_TRUE) ? ((mod) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_MODULE) == RUBY_T_FALSE) ? ((mod) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_MODULE) == RUBY_T_NIL) ? ((mod) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_MODULE) == RUBY_T_UNDEF) ? ((mod) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_MODULE) == RUBY_T_SYMBOL) ? ((((VALUE)(mod)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(mod) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(mod) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(mod))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_MODULE) == RUBY_T_FLOAT) ? ( ((((int)(long)(mod))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(mod) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(mod) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(mod))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(mod) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(mod) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(mod))->flags & RUBY_T_MASK) == (RUBY_T_MODULE)))) {
13309 rb_raise(rb_eTypeError, "%""l""i" "\v"" is not a module", rb_id2str(id));
13310 }
13311 else {
13312 return mod;
13313 }
13314}
13315static VALUE
13316vm_declare_class(ID id, rb_num_t flags, VALUE cbase, VALUE super)
13317{
13318 VALUE s = ((flags) & 0x10) ? super : rb_cObject;
13319 VALUE c = rb_define_class_id(id, s);
13320 rb_set_class_path_string(c, cbase, rb_id2str(id));
13321 rb_const_set(cbase, id, c);
13322 rb_class_inherited(s, c);
13323 return c;
13324}
13325static VALUE
13326vm_declare_module(ID id, VALUE cbase)
13327{
13328 VALUE mod = rb_define_module_id(id);
13329 rb_set_class_path_string(mod, cbase, rb_id2str(id));
13330 rb_const_set(cbase, id, mod);
13331 return mod;
13332}
13333static VALUE
13334vm_define_class(ID id, rb_num_t flags, VALUE cbase, VALUE super)
13335{
13336 VALUE klass;
13337 if (((flags) & 0x10) && !( ((RUBY_T_CLASS) == RUBY_T_FIXNUM) ? (((int)(long)(super))&RUBY_FIXNUM_FLAG) : ((RUBY_T_CLASS) == RUBY_T_TRUE) ? ((super) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_CLASS) == RUBY_T_FALSE) ? ((super) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_CLASS) == RUBY_T_NIL) ? ((super) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_CLASS) == RUBY_T_UNDEF) ? ((super) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_CLASS) == RUBY_T_SYMBOL) ? ((((VALUE)(super)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(super) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(super) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(super))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_CLASS) == RUBY_T_FLOAT) ? ( ((((int)(long)(super))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(super) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(super) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(super))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(super) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(super) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(super))->flags & RUBY_T_MASK) == (RUBY_T_CLASS)))) {
13338 rb_raise(rb_eTypeError,
13339 "superclass must be a Class (%""l""i" "\v"" given)",
13340 rb_obj_class(super));
13341 }
13342 vm_check_if_namespace(cbase);
13343 rb_autoload_load(cbase, id);
13344 if ((klass = vm_const_get_under(id, flags, cbase)) != 0) {
13345 return vm_check_if_class(id, flags, super, klass);
13346 }
13347 else {
13348 return vm_declare_class(id, flags, cbase, super);
13349 }
13350}
13351static VALUE
13352vm_define_module(ID id, rb_num_t flags, VALUE cbase)
13353{
13354 VALUE mod;
13355 vm_check_if_namespace(cbase);
13356 if ((mod = vm_const_get_under(id, flags, cbase)) != 0) {
13357 return vm_check_if_module(id, mod);
13358 }
13359 else {
13360 return vm_declare_module(id, cbase);
13361 }
13362}
13363static VALUE
13364vm_find_or_create_class_by_id(ID id,
13365 rb_num_t flags,
13366 VALUE cbase,
13367 VALUE super)
13368{
13369 rb_vm_defineclass_type_t type = ((rb_vm_defineclass_type_t)(flags) & VM_DEFINECLASS_TYPE_MASK);
13370 switch (type) {
13371 case VM_DEFINECLASS_TYPE_CLASS:
13372 return vm_define_class(id, flags, cbase, super);
13373 case VM_DEFINECLASS_TYPE_SINGLETON_CLASS:
13374 return rb_singleton_class(cbase);
13375 case VM_DEFINECLASS_TYPE_MODULE:
13376 return vm_define_module(id, flags, cbase);
13377 default:
13378 rb_bug("unknown defineclass type: %d", (int)type);
13379 }
13380}
13381static VALUE
13382vm_opt_str_freeze(VALUE str, int bop, ID id)
13383{
13384 if (((__builtin_expect(!!((rb_current_vm()->redefined_flag[(bop)]&((1 << 2))) == 0), 1)))) {
13385 return str;
13386 }
13387 else {
13388 return ((VALUE)RUBY_Qundef);
13389 }
13390}
13391static VALUE
13392vm_opt_newarray_max(rb_num_t num, const VALUE *ptr)
13393{
13394 if (((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MAX)]&((1 << 3))) == 0), 1)))) {
13395 if (num == 0) {
13396 return ((VALUE)RUBY_Qnil);
13397 }
13398 else {
13399 struct cmp_opt_data cmp_opt = { 0, 0 };
13400 VALUE result = *ptr;
13401 rb_snum_t i = num - 1;
13402 while (i-- > 0) {
13403 const VALUE v = *++ptr;
13404 if ((((((int)(long)(v))&RUBY_FIXNUM_FLAG) && (((int)(long)(result))&RUBY_FIXNUM_FLAG) && (((cmp_opt).opt_inited & (1U << cmp_opt_Fixnum)) ? ((cmp_opt).opt_methods & (1U << cmp_opt_Fixnum)) : (((cmp_opt).opt_inited |= (1U << cmp_opt_Fixnum)), rb_method_basic_definition_p(rb_cInteger, idCmp) && ((cmp_opt).opt_methods |= (1U << cmp_opt_Fixnum))))) ? (((long)v > (long)result) ? 1 : ((long)v < (long)result) ? -1 : 0) : ((( ((RUBY_T_STRING) == RUBY_T_FIXNUM) ? (((int)(long)((v)))&RUBY_FIXNUM_FLAG) : ((RUBY_T_STRING) == RUBY_T_TRUE) ? (((v)) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_STRING) == RUBY_T_FALSE) ? (((v)) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_STRING) == RUBY_T_NIL) ? (((v)) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_STRING) == RUBY_T_UNDEF) ? (((v)) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_STRING) == RUBY_T_SYMBOL) ? ((((VALUE)((v))&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)((v)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((v)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((v)))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_STRING) == RUBY_T_FLOAT) ? ( ((((int)(long)((v)))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)((v)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((v)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((v)))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)((v)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((v)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((v)))->flags & RUBY_T_MASK) == (RUBY_T_STRING))) && rb_class_of((VALUE)(v)) == rb_cString) && (( ((RUBY_T_STRING) == RUBY_T_FIXNUM) ? (((int)(long)((result)))&RUBY_FIXNUM_FLAG) : ((RUBY_T_STRING) == RUBY_T_TRUE) ? (((result)) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_STRING) == RUBY_T_FALSE) ? (((result)) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_STRING) == RUBY_T_NIL) ? (((result)) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_STRING) == RUBY_T_UNDEF) ? (((result)) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_STRING) == RUBY_T_SYMBOL) ? ((((VALUE)((result))&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)((result)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((result)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((result)))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_STRING) == RUBY_T_FLOAT) ? ( ((((int)(long)((result)))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)((result)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((result)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((result)))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)((result)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((result)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((result)))->flags & RUBY_T_MASK) == (RUBY_T_STRING))) && rb_class_of((VALUE)(result)) == rb_cString) && (((cmp_opt).opt_inited & (1U << cmp_opt_String)) ? ((cmp_opt).opt_methods & (1U << cmp_opt_String)) : (((cmp_opt).opt_inited |= (1U << cmp_opt_String)), rb_method_basic_definition_p(rb_cString, idCmp) && ((cmp_opt).opt_methods |= (1U << cmp_opt_String))))) ? rb_str_cmp(v, result) : (( ((((int)(long)(v))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(v) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(v) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(v))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) && ( ((((int)(long)(result))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(result) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(result) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(result))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) && (((cmp_opt).opt_inited & (1U << cmp_opt_Float)) ? ((cmp_opt).opt_methods & (1U << cmp_opt_Float)) : (((cmp_opt).opt_inited |= (1U << cmp_opt_Float)), rb_method_basic_definition_p(rb_cFloat, idCmp) && ((cmp_opt).opt_methods |= (1U << cmp_opt_Float))))) ? rb_float_cmp(v, result) : rb_cmpint(rb_funcallv(v, idCmp, 1, &result), v, result)) > 0) {
13405 result = v;
13406 }
13407 }
13408 return result;
13409 }
13410 }
13411 else {
13412 VALUE ary = rb_ary_new_from_values(num, ptr);
13413 return __extension__({ const int rb_funcall_argc = (0); const VALUE rb_funcall_args[] = {}; const int rb_funcall_nargs = (int)(sizeof(rb_funcall_args) / sizeof(VALUE)); rb_funcallv(ary, idMax, __builtin_choose_expr(__builtin_constant_p(rb_funcall_argc), (((rb_funcall_argc) == 0 ? (rb_funcall_nargs) <= 1 : (rb_funcall_argc) == (rb_funcall_nargs)) ? (rb_funcall_argc) : rb_varargs_bad_length(rb_funcall_argc, rb_funcall_nargs)), (((rb_funcall_argc) <= (rb_funcall_nargs)) ? (rb_funcall_argc) : (rb_fatal("argc(%d) exceeds actual arguments(%d)", rb_funcall_argc, rb_funcall_nargs), 0))), rb_funcall_nargs ? rb_funcall_args : ((void *)0)); });
13414 }
13415}
13416static VALUE
13417vm_opt_newarray_min(rb_num_t num, const VALUE *ptr)
13418{
13419 if (((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MIN)]&((1 << 3))) == 0), 1)))) {
13420 if (num == 0) {
13421 return ((VALUE)RUBY_Qnil);
13422 }
13423 else {
13424 struct cmp_opt_data cmp_opt = { 0, 0 };
13425 VALUE result = *ptr;
13426 rb_snum_t i = num - 1;
13427 while (i-- > 0) {
13428 const VALUE v = *++ptr;
13429 if ((((((int)(long)(v))&RUBY_FIXNUM_FLAG) && (((int)(long)(result))&RUBY_FIXNUM_FLAG) && (((cmp_opt).opt_inited & (1U << cmp_opt_Fixnum)) ? ((cmp_opt).opt_methods & (1U << cmp_opt_Fixnum)) : (((cmp_opt).opt_inited |= (1U << cmp_opt_Fixnum)), rb_method_basic_definition_p(rb_cInteger, idCmp) && ((cmp_opt).opt_methods |= (1U << cmp_opt_Fixnum))))) ? (((long)v > (long)result) ? 1 : ((long)v < (long)result) ? -1 : 0) : ((( ((RUBY_T_STRING) == RUBY_T_FIXNUM) ? (((int)(long)((v)))&RUBY_FIXNUM_FLAG) : ((RUBY_T_STRING) == RUBY_T_TRUE) ? (((v)) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_STRING) == RUBY_T_FALSE) ? (((v)) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_STRING) == RUBY_T_NIL) ? (((v)) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_STRING) == RUBY_T_UNDEF) ? (((v)) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_STRING) == RUBY_T_SYMBOL) ? ((((VALUE)((v))&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)((v)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((v)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((v)))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_STRING) == RUBY_T_FLOAT) ? ( ((((int)(long)((v)))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)((v)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((v)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((v)))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)((v)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((v)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((v)))->flags & RUBY_T_MASK) == (RUBY_T_STRING))) && rb_class_of((VALUE)(v)) == rb_cString) && (( ((RUBY_T_STRING) == RUBY_T_FIXNUM) ? (((int)(long)((result)))&RUBY_FIXNUM_FLAG) : ((RUBY_T_STRING) == RUBY_T_TRUE) ? (((result)) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_STRING) == RUBY_T_FALSE) ? (((result)) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_STRING) == RUBY_T_NIL) ? (((result)) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_STRING) == RUBY_T_UNDEF) ? (((result)) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_STRING) == RUBY_T_SYMBOL) ? ((((VALUE)((result))&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)((result)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((result)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((result)))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_STRING) == RUBY_T_FLOAT) ? ( ((((int)(long)((result)))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)((result)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((result)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((result)))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)((result)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((result)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((result)))->flags & RUBY_T_MASK) == (RUBY_T_STRING))) && rb_class_of((VALUE)(result)) == rb_cString) && (((cmp_opt).opt_inited & (1U << cmp_opt_String)) ? ((cmp_opt).opt_methods & (1U << cmp_opt_String)) : (((cmp_opt).opt_inited |= (1U << cmp_opt_String)), rb_method_basic_definition_p(rb_cString, idCmp) && ((cmp_opt).opt_methods |= (1U << cmp_opt_String))))) ? rb_str_cmp(v, result) : (( ((((int)(long)(v))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(v) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(v) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(v))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) && ( ((((int)(long)(result))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(result) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(result) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(result))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) && (((cmp_opt).opt_inited & (1U << cmp_opt_Float)) ? ((cmp_opt).opt_methods & (1U << cmp_opt_Float)) : (((cmp_opt).opt_inited |= (1U << cmp_opt_Float)), rb_method_basic_definition_p(rb_cFloat, idCmp) && ((cmp_opt).opt_methods |= (1U << cmp_opt_Float))))) ? rb_float_cmp(v, result) : rb_cmpint(rb_funcallv(v, idCmp, 1, &result), v, result)) < 0) {
13430 result = v;
13431 }
13432 }
13433 return result;
13434 }
13435 }
13436 else {
13437 VALUE ary = rb_ary_new_from_values(num, ptr);
13438 return __extension__({ const int rb_funcall_argc = (0); const VALUE rb_funcall_args[] = {}; const int rb_funcall_nargs = (int)(sizeof(rb_funcall_args) / sizeof(VALUE)); rb_funcallv(ary, idMin, __builtin_choose_expr(__builtin_constant_p(rb_funcall_argc), (((rb_funcall_argc) == 0 ? (rb_funcall_nargs) <= 1 : (rb_funcall_argc) == (rb_funcall_nargs)) ? (rb_funcall_argc) : rb_varargs_bad_length(rb_funcall_argc, rb_funcall_nargs)), (((rb_funcall_argc) <= (rb_funcall_nargs)) ? (rb_funcall_argc) : (rb_fatal("argc(%d) exceeds actual arguments(%d)", rb_funcall_argc, rb_funcall_nargs), 0))), rb_funcall_nargs ? rb_funcall_args : ((void *)0)); });
13439 }
13440}
13441static int
13442vm_ic_hit_p(IC ic, const VALUE *reg_ep)
13443{
13444 if (ic->ic_serial == (ruby_vm_global_constant_state)) {
13445 return (ic->ic_cref == ((void *)0) || ic->ic_cref == rb_vm_get_cref(reg_ep));
13446 }
13447 return 0;
13448}
13449static void
13450vm_ic_update(IC ic, VALUE val, const VALUE *reg_ep)
13451{
13452 ((void)0);
13453 ic->ic_value.value = val;
13454 ic->ic_serial = (ruby_vm_global_constant_state) - ruby_vm_const_missing_count;
13455 ic->ic_cref = vm_get_const_key_cref(reg_ep);
13456 ruby_vm_const_missing_count = 0;
13457}
13458static VALUE
13459vm_once_dispatch(rb_execution_context_t *ec, ISEQ iseq, ISE is)
13460{
13461 rb_thread_t *th = rb_ec_thread_ptr(ec);
13462 rb_thread_t *const RUNNING_THREAD_ONCE_DONE = (rb_thread_t *)(0x1);
13463 again:
13464 if (is->once.running_thread == RUNNING_THREAD_ONCE_DONE) {
13465 return is->once.value;
13466 }
13467 else if (is->once.running_thread == ((void *)0)) {
13468 VALUE val;
13469 is->once.running_thread = th;
13470 val = rb_ensure(vm_once_exec, (VALUE)iseq, vm_once_clear, (VALUE)is);
13471 rb_obj_write((VALUE)(ec->cfp->iseq), (VALUE *)(&is->once.value), (VALUE)(val), "./vm_insnhelper.c", 3294);
13472 is->once.running_thread = RUNNING_THREAD_ONCE_DONE;
13473 return val;
13474 }
13475 else if (is->once.running_thread == th) {
13476 return vm_once_exec((VALUE)iseq);
13477 }
13478 else {
13479 rb_vm_check_ints(ec);
13481 goto again;
13482 }
13483}
13484static OFFSET
13485vm_case_dispatch(CDHASH hash, OFFSET else_offset, VALUE key)
13486{
13487 switch (__extension__({ VALUE arg_obj = (key); (((VALUE)(arg_obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(arg_obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) ? -1 : (int)(((struct RBasic*)(arg_obj))->flags & RUBY_T_MASK); })) {
13488 case -1:
13489 case RUBY_T_FLOAT:
13490 case RUBY_T_SYMBOL:
13491 case RUBY_T_BIGNUM:
13492 case RUBY_T_STRING:
13493 if (((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_EQQ)]&((1 << 6) | (1 << 0) | (1 << 1) | (1 << 9) | (1 << 10) | (1 << 11) | (1 << 2))) == 0), 1)))) {
13494 st_data_t val;
13495 if (( ((((int)(long)(key))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(key) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(key) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(key))->flags & RUBY_T_MASK) == RUBY_T_FLOAT))) {
13496 double kval = rb_float_value_inline(key);
13497 if (!__builtin_isinf_sign (kval) && modf(kval, &kval) == 0.0) {
13498 key = (((kval) < (0x7fffffffffffffffL>>1)+1) && ((kval) >= (((long)(-0x7fffffffffffffffL - 1L))>>(int)(1)))) ? (((VALUE)((long)kval))<<1 | RUBY_FIXNUM_FLAG) : rb_dbl2big(kval);
13499 }
13500 }
13501 if (rb_hash_stlike_lookup(hash, key, &val)) {
13502 return ((long)(((long)((VALUE)val))>>(int)(1)));
13503 }
13504 else {
13505 return else_offset;
13506 }
13507 }
13508 }
13509 return 0;
13510}
13511__attribute__ ((__noreturn__)) static void vm_stack_consistency_error(const rb_execution_context_t *ec, const rb_control_frame_t *, const VALUE *);
13512static void
13513vm_stack_consistency_error(const rb_execution_context_t *ec,
13514 const rb_control_frame_t *cfp,
13515 const VALUE *bp)
13516{
13517 const ptrdiff_t nsp = ((cfp->sp) - (ec)->vm_stack);
13518 const ptrdiff_t nbp = ((bp) - (ec)->vm_stack);
13519 static const char stack_consistency_error[] =
13520 "Stack consistency error (sp: %""t""d"", bp: %""t""d"")";
13521 rb_bug(stack_consistency_error, nsp, nbp);
13522}
13523ALWAYS_INLINE(static inline VALUE
13524vm_opt_plus(VALUE recv, VALUE obj));
13525static inline VALUE
13526vm_opt_plus(VALUE recv, VALUE obj) {
13527 if (((recv) & (obj) & 1) &&
13528 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_PLUS)]&((1 << 0))) == 0), 1)))) {
13529 return rb_fix_plus_fix(recv, obj);
13530 }
13531 else if ((((((recv)^2) | ((obj)^2)) & 3) == 0) &&
13532 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_PLUS)]&((1 << 1))) == 0), 1)))) {
13533 return rb_float_new_inline(rb_float_value_inline(recv) + rb_float_value_inline(obj));
13534 }
13535 else if ((((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) || (((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0))) {
13536 return ((VALUE)RUBY_Qundef);
13537 }
13538 else if ((((struct RBasic*)(recv))->klass) == rb_cFloat &&
13539 (((struct RBasic*)(obj))->klass) == rb_cFloat &&
13540 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_PLUS)]&((1 << 1))) == 0), 1)))) {
13541 return rb_float_new_inline(rb_float_value_inline(recv) + rb_float_value_inline(obj));
13542 }
13543 else if ((((struct RBasic*)(recv))->klass) == rb_cString &&
13544 (((struct RBasic*)(obj))->klass) == rb_cString &&
13545 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_PLUS)]&((1 << 2))) == 0), 1)))) {
13546 return rb_str_plus(recv, obj);
13547 }
13548 else if ((((struct RBasic*)(recv))->klass) == rb_cArray &&
13549 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_PLUS)]&((1 << 3))) == 0), 1)))) {
13550 return rb_ary_plus(recv, obj);
13551 }
13552 else {
13553 return ((VALUE)RUBY_Qundef);
13554 }
13555}
13556ALWAYS_INLINE(static inline VALUE
13557vm_opt_minus(VALUE recv, VALUE obj));
13558static inline VALUE
13559vm_opt_minus(VALUE recv, VALUE obj) {
13560 if (((recv) & (obj) & 1) &&
13561 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MINUS)]&((1 << 0))) == 0), 1)))) {
13562 return rb_fix_minus_fix(recv, obj);
13563 }
13564 else if ((((((recv)^2) | ((obj)^2)) & 3) == 0) &&
13565 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MINUS)]&((1 << 1))) == 0), 1)))) {
13566 return rb_float_new_inline(rb_float_value_inline(recv) - rb_float_value_inline(obj));
13567 }
13568 else if ((((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) || (((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0))) {
13569 return ((VALUE)RUBY_Qundef);
13570 }
13571 else if ((((struct RBasic*)(recv))->klass) == rb_cFloat &&
13572 (((struct RBasic*)(obj))->klass) == rb_cFloat &&
13573 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MINUS)]&((1 << 1))) == 0), 1)))) {
13574 return rb_float_new_inline(rb_float_value_inline(recv) - rb_float_value_inline(obj));
13575 }
13576 else {
13577 return ((VALUE)RUBY_Qundef);
13578 }
13579}
13580ALWAYS_INLINE(static inline VALUE
13581vm_opt_mult(VALUE recv, VALUE obj));
13582static inline VALUE
13583vm_opt_mult(VALUE recv, VALUE obj) {
13584 if (((recv) & (obj) & 1) &&
13585 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MULT)]&((1 << 0))) == 0), 1)))) {
13586 return rb_fix_mul_fix(recv, obj);
13587 }
13588 else if ((((((recv)^2) | ((obj)^2)) & 3) == 0) &&
13589 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MULT)]&((1 << 1))) == 0), 1)))) {
13590 return rb_float_new_inline(rb_float_value_inline(recv) * rb_float_value_inline(obj));
13591 }
13592 else if ((((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) || (((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0))) {
13593 return ((VALUE)RUBY_Qundef);
13594 }
13595 else if ((((struct RBasic*)(recv))->klass) == rb_cFloat &&
13596 (((struct RBasic*)(obj))->klass) == rb_cFloat &&
13597 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MULT)]&((1 << 1))) == 0), 1)))) {
13598 return rb_float_new_inline(rb_float_value_inline(recv) * rb_float_value_inline(obj));
13599 }
13600 else {
13601 return ((VALUE)RUBY_Qundef);
13602 }
13603}
13604ALWAYS_INLINE(static inline VALUE
13605vm_opt_div(VALUE recv, VALUE obj));
13606static inline VALUE
13607vm_opt_div(VALUE recv, VALUE obj) {
13608 if (((recv) & (obj) & 1) &&
13609 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_DIV)]&((1 << 0))) == 0), 1)))) {
13610 return (((long)(((long)(obj))>>(int)(1))) == 0) ? ((VALUE)RUBY_Qundef) : rb_fix_div_fix(recv, obj);
13611 }
13612 else if ((((((recv)^2) | ((obj)^2)) & 3) == 0) &&
13613 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_DIV)]&((1 << 1))) == 0), 1)))) {
13614 return rb_flo_div_flo(recv, obj);
13615 }
13616 else if ((((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) || (((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0))) {
13617 return ((VALUE)RUBY_Qundef);
13618 }
13619 else if ((((struct RBasic*)(recv))->klass) == rb_cFloat &&
13620 (((struct RBasic*)(obj))->klass) == rb_cFloat &&
13621 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_DIV)]&((1 << 1))) == 0), 1)))) {
13622 return rb_flo_div_flo(recv, obj);
13623 }
13624 else {
13625 return ((VALUE)RUBY_Qundef);
13626 }
13627}
13628ALWAYS_INLINE(static inline VALUE
13629vm_opt_mod(VALUE recv, VALUE obj));
13630static inline VALUE
13631vm_opt_mod(VALUE recv, VALUE obj) {
13632 if (((recv) & (obj) & 1) &&
13633 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MOD)]&((1 << 0))) == 0), 1)))) {
13634 return (((long)(((long)(obj))>>(int)(1))) == 0) ? ((VALUE)RUBY_Qundef) : rb_fix_mod_fix(recv, obj);
13635 }
13636 else if ((((((recv)^2) | ((obj)^2)) & 3) == 0) &&
13637 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MOD)]&((1 << 1))) == 0), 1)))) {
13638 return rb_float_new_inline(ruby_float_mod(rb_float_value_inline(recv), rb_float_value_inline(obj)));
13639 }
13640 else if ((((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) || (((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0))) {
13641 return ((VALUE)RUBY_Qundef);
13642 }
13643 else if ((((struct RBasic*)(recv))->klass) == rb_cFloat &&
13644 (((struct RBasic*)(obj))->klass) == rb_cFloat &&
13645 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MOD)]&((1 << 1))) == 0), 1)))) {
13646 return rb_float_new_inline(ruby_float_mod(rb_float_value_inline(recv), rb_float_value_inline(obj)));
13647 }
13648 else {
13649 return ((VALUE)RUBY_Qundef);
13650 }
13651}
13652ALWAYS_INLINE(static inline VALUE
13653vm_opt_neq(CALL_INFO ci, CALL_CACHE cc,
13654 CALL_INFO ci_eq, CALL_CACHE cc_eq,
13655 VALUE recv, VALUE obj));
13656static inline VALUE
13657vm_opt_neq(CALL_INFO ci, CALL_CACHE cc,
13658 CALL_INFO ci_eq, CALL_CACHE cc_eq,
13659 VALUE recv, VALUE obj) {
13660 if (vm_method_cfunc_is(ci, cc, recv, rb_obj_not_equal)) {
13661 VALUE val = opt_eq_func(recv, obj, ci_eq, cc_eq);
13662 if (val != ((VALUE)RUBY_Qundef)) {
13663 return !(((VALUE)(val) & (VALUE)~((VALUE)RUBY_Qnil)) == 0) ? ((VALUE)RUBY_Qfalse) : ((VALUE)RUBY_Qtrue);
13664 }
13665 }
13666 return ((VALUE)RUBY_Qundef);
13667}
13668ALWAYS_INLINE(static inline VALUE
13669vm_opt_lt(VALUE recv, VALUE obj));
13670static inline VALUE
13671vm_opt_lt(VALUE recv, VALUE obj) {
13672 if (((recv) & (obj) & 1) &&
13673 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_LT)]&((1 << 0))) == 0), 1)))) {
13674 return (long)recv < (long)obj ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
13675 }
13676 else if ((((((recv)^2) | ((obj)^2)) & 3) == 0) &&
13677 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_LT)]&((1 << 1))) == 0), 1)))) {
13678 return rb_float_value_inline(recv) < rb_float_value_inline(obj) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
13679 }
13680 else if ((((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) || (((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0))) {
13681 return ((VALUE)RUBY_Qundef);
13682 }
13683 else if ((((struct RBasic*)(recv))->klass) == rb_cFloat &&
13684 (((struct RBasic*)(obj))->klass) == rb_cFloat &&
13685 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_LT)]&((1 << 1))) == 0), 1)))) {
13686 ;
13687 return rb_float_value_inline(recv) < rb_float_value_inline(obj) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
13688 }
13689 else {
13690 return ((VALUE)RUBY_Qundef);
13691 }
13692}
13693ALWAYS_INLINE(static inline VALUE
13694vm_opt_le(VALUE recv, VALUE obj));
13695static inline VALUE
13696vm_opt_le(VALUE recv, VALUE obj) {
13697 if (((recv) & (obj) & 1) &&
13698 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_LE)]&((1 << 0))) == 0), 1)))) {
13699 return (long)recv <= (long)obj ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
13700 }
13701 else if ((((((recv)^2) | ((obj)^2)) & 3) == 0) &&
13702 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_LE)]&((1 << 1))) == 0), 1)))) {
13703 return rb_float_value_inline(recv) <= rb_float_value_inline(obj) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
13704 }
13705 else if ((((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) || (((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0))) {
13706 return ((VALUE)RUBY_Qundef);
13707 }
13708 else if ((((struct RBasic*)(recv))->klass) == rb_cFloat &&
13709 (((struct RBasic*)(obj))->klass) == rb_cFloat &&
13710 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_LE)]&((1 << 1))) == 0), 1)))) {
13711 ;
13712 return rb_float_value_inline(recv) <= rb_float_value_inline(obj) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
13713 }
13714 else {
13715 return ((VALUE)RUBY_Qundef);
13716 }
13717}
13718ALWAYS_INLINE(static inline VALUE
13719vm_opt_gt(VALUE recv, VALUE obj));
13720static inline VALUE
13721vm_opt_gt(VALUE recv, VALUE obj) {
13722 if (((recv) & (obj) & 1) &&
13723 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_GT)]&((1 << 0))) == 0), 1)))) {
13724 return (long)recv > (long)obj ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
13725 }
13726 else if ((((((recv)^2) | ((obj)^2)) & 3) == 0) &&
13727 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_GT)]&((1 << 1))) == 0), 1)))) {
13728 return rb_float_value_inline(recv) > rb_float_value_inline(obj) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
13729 }
13730 else if ((((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) || (((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0))) {
13731 return ((VALUE)RUBY_Qundef);
13732 }
13733 else if ((((struct RBasic*)(recv))->klass) == rb_cFloat &&
13734 (((struct RBasic*)(obj))->klass) == rb_cFloat &&
13735 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_GT)]&((1 << 1))) == 0), 1)))) {
13736 ;
13737 return rb_float_value_inline(recv) > rb_float_value_inline(obj) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
13738 }
13739 else {
13740 return ((VALUE)RUBY_Qundef);
13741 }
13742}
13743ALWAYS_INLINE(static inline VALUE
13744vm_opt_ge(VALUE recv, VALUE obj));
13745static inline VALUE
13746vm_opt_ge(VALUE recv, VALUE obj) {
13747 if (((recv) & (obj) & 1) &&
13748 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_GE)]&((1 << 0))) == 0), 1)))) {
13749 return (long)recv >= (long)obj ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
13750 }
13751 else if ((((((recv)^2) | ((obj)^2)) & 3) == 0) &&
13752 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_GE)]&((1 << 1))) == 0), 1)))) {
13753 return rb_float_value_inline(recv) >= rb_float_value_inline(obj) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
13754 }
13755 else if ((((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) || (((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0))) {
13756 return ((VALUE)RUBY_Qundef);
13757 }
13758 else if ((((struct RBasic*)(recv))->klass) == rb_cFloat &&
13759 (((struct RBasic*)(obj))->klass) == rb_cFloat &&
13760 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_GE)]&((1 << 1))) == 0), 1)))) {
13761 ;
13762 return rb_float_value_inline(recv) >= rb_float_value_inline(obj) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
13763 }
13764 else {
13765 return ((VALUE)RUBY_Qundef);
13766 }
13767}
13768ALWAYS_INLINE(static inline VALUE
13769vm_opt_ltlt(VALUE recv, VALUE obj));
13770static inline VALUE
13771vm_opt_ltlt(VALUE recv, VALUE obj) {
13772 if ((((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0))) {
13773 return ((VALUE)RUBY_Qundef);
13774 }
13775 else if ((((struct RBasic*)(recv))->klass) == rb_cString &&
13776 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_LTLT)]&((1 << 2))) == 0), 1)))) {
13777 return rb_str_concat(recv, obj);
13778 }
13779 else if ((((struct RBasic*)(recv))->klass) == rb_cArray &&
13780 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_LTLT)]&((1 << 3))) == 0), 1)))) {
13781 return rb_ary_push(recv, obj);
13782 }
13783 else {
13784 return ((VALUE)RUBY_Qundef);
13785 }
13786}
13787ALWAYS_INLINE(static inline VALUE
13788vm_opt_and(VALUE recv, VALUE obj));
13789static inline VALUE
13790vm_opt_and(VALUE recv, VALUE obj) {
13791 if (((recv) & (obj) & 1) &&
13792 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_AND)]&((1 << 0))) == 0), 1)))) {
13793 return rb_long2num_inline(((long)(((long)(recv))>>(int)(1))) & ((long)(((long)(obj))>>(int)(1))));
13794 }
13795 else {
13796 return ((VALUE)RUBY_Qundef);
13797 }
13798}
13799ALWAYS_INLINE(static inline VALUE
13800vm_opt_or(VALUE recv, VALUE obj));
13801static inline VALUE
13802vm_opt_or(VALUE recv, VALUE obj) {
13803 if (((recv) & (obj) & 1) &&
13804 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_OR)]&((1 << 0))) == 0), 1)))) {
13805 return rb_long2num_inline(((long)(((long)(recv))>>(int)(1))) | ((long)(((long)(obj))>>(int)(1))));
13806 }
13807 else {
13808 return ((VALUE)RUBY_Qundef);
13809 }
13810}
13811ALWAYS_INLINE(static inline VALUE
13812vm_opt_aref(VALUE recv, VALUE obj));
13813static inline VALUE
13814vm_opt_aref(VALUE recv, VALUE obj) {
13815 if ((((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0))) {
13816 return ((VALUE)RUBY_Qundef);
13817 }
13818 else if ((((struct RBasic*)(recv))->klass) == rb_cArray &&
13819 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_AREF)]&((1 << 3))) == 0), 1)))) {
13820 if ((((int)(long)(obj))&RUBY_FIXNUM_FLAG)) {
13821 return rb_ary_entry_internal(recv, ((long)(((long)(obj))>>(int)(1))));
13822 }
13823 else {
13824 return rb_ary_aref1(recv, obj);
13825 }
13826 }
13827 else if ((((struct RBasic*)(recv))->klass) == rb_cHash &&
13828 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_AREF)]&((1 << 4))) == 0), 1)))) {
13829 return rb_hash_aref(recv, obj);
13830 }
13831 else {
13832 return ((VALUE)RUBY_Qundef);
13833 }
13834}
13835ALWAYS_INLINE(static inline VALUE
13836vm_opt_aset(VALUE recv, VALUE obj, VALUE set));
13837static inline VALUE
13838vm_opt_aset(VALUE recv, VALUE obj, VALUE set) {
13839 if ((((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0))) {
13840 return ((VALUE)RUBY_Qundef);
13841 }
13842 else if ((((struct RBasic*)(recv))->klass) == rb_cArray &&
13843 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_ASET)]&((1 << 3))) == 0), 1))) &&
13844 (((int)(long)(obj))&RUBY_FIXNUM_FLAG)) {
13845 rb_ary_store(recv, ((long)(((long)(obj))>>(int)(1))), set);
13846 return set;
13847 }
13848 else if ((((struct RBasic*)(recv))->klass) == rb_cHash &&
13849 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_ASET)]&((1 << 4))) == 0), 1)))) {
13850 rb_hash_aset(recv, obj, set);
13851 return set;
13852 }
13853 else {
13854 return ((VALUE)RUBY_Qundef);
13855 }
13856}
13857ALWAYS_INLINE(static inline VALUE
13858vm_opt_aref_with(VALUE recv, VALUE key));
13859static inline VALUE
13860vm_opt_aref_with(VALUE recv, VALUE key) {
13861 if (!(((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (((struct RBasic*)(recv))->klass) == rb_cHash &&
13862 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_AREF)]&((1 << 4))) == 0), 1))) &&
13863 rb_hash_compare_by_id_p(recv) == ((VALUE)RUBY_Qfalse)) {
13864 return rb_hash_aref(recv, key);
13865 }
13866 else {
13867 return ((VALUE)RUBY_Qundef);
13868 }
13869}
13870ALWAYS_INLINE(static inline VALUE
13871vm_opt_aset_with(VALUE recv, VALUE key, VALUE val));
13872static inline VALUE
13873vm_opt_aset_with(VALUE recv, VALUE key, VALUE val) {
13874 if (!(((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (((struct RBasic*)(recv))->klass) == rb_cHash &&
13875 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_ASET)]&((1 << 4))) == 0), 1))) &&
13876 rb_hash_compare_by_id_p(recv) == ((VALUE)RUBY_Qfalse)) {
13877 return rb_hash_aset(recv, key, val);
13878 }
13879 else {
13880 return ((VALUE)RUBY_Qundef);
13881 }
13882}
13883static VALUE
13884vm_opt_length(VALUE recv, int bop)
13885{
13886 if ((((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0))) {
13887 return ((VALUE)RUBY_Qundef);
13888 }
13889 else if ((((struct RBasic*)(recv))->klass) == rb_cString &&
13890 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(bop)]&((1 << 2))) == 0), 1)))) {
13891 if (bop == BOP_EMPTY_P) {
13892 return rb_long2num_inline((!(((struct RBasic*)(recv))->flags & RSTRING_NOEMBED) ? (long)((((struct RBasic*)(recv))->flags >> RSTRING_EMBED_LEN_SHIFT) & (RSTRING_EMBED_LEN_MASK >> RSTRING_EMBED_LEN_SHIFT)) : ((struct RString*)(recv))->as.heap.len));
13893 }
13894 else {
13895 return rb_str_length(recv);
13896 }
13897 }
13898 else if ((((struct RBasic*)(recv))->klass) == rb_cArray &&
13899 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(bop)]&((1 << 3))) == 0), 1)))) {
13900 return rb_long2num_inline(rb_array_len(recv));
13901 }
13902 else if ((((struct RBasic*)(recv))->klass) == rb_cHash &&
13903 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(bop)]&((1 << 4))) == 0), 1)))) {
13904 return (((VALUE)(((!(((struct RBasic*)((recv)))->flags&(RHASH_ST_TABLE_FLAG))) ? ((unsigned int)((((struct RBasic*)(recv))->flags & (VALUE)RHASH_AR_TABLE_SIZE_MASK) >> RHASH_AR_TABLE_SIZE_SHIFT)) : ((((struct RHash*)(recv))->as.st)->num_entries))))<<1 | RUBY_FIXNUM_FLAG);
13905 }
13906 else {
13907 return ((VALUE)RUBY_Qundef);
13908 }
13909}
13910static VALUE
13911vm_opt_empty_p(VALUE recv)
13912{
13913 switch (vm_opt_length(recv, BOP_EMPTY_P)) {
13914 case ((VALUE)RUBY_Qundef): return ((VALUE)RUBY_Qundef);
13915 case (((VALUE)(0))<<1 | RUBY_FIXNUM_FLAG): return ((VALUE)RUBY_Qtrue);
13916 default: return ((VALUE)RUBY_Qfalse);
13917 }
13918}
13919static VALUE
13920fix_succ(VALUE x)
13921{
13922 switch (x) {
13923 case ~0UL:
13924 return (((VALUE)(0))<<1 | RUBY_FIXNUM_FLAG);
13925 case ((~0UL)>>(int)(1)):
13926 return rb_uint2big(1UL << (8 * 8 - 2));
13927 default:
13928 return x + 2;
13929 }
13930}
13931static VALUE
13932vm_opt_succ(VALUE recv)
13933{
13934 if ((((int)(long)(recv))&RUBY_FIXNUM_FLAG) &&
13935 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_SUCC)]&((1 << 0))) == 0), 1)))) {
13936 return fix_succ(recv);
13937 }
13938 else if ((((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0))) {
13939 return ((VALUE)RUBY_Qundef);
13940 }
13941 else if ((((struct RBasic*)(recv))->klass) == rb_cString &&
13942 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_SUCC)]&((1 << 2))) == 0), 1)))) {
13943 return rb_str_succ(recv);
13944 }
13945 else {
13946 return ((VALUE)RUBY_Qundef);
13947 }
13948}
13949ALWAYS_INLINE(static inline VALUE
13950vm_opt_not(CALL_INFO ci, CALL_CACHE cc, VALUE recv));
13951static inline VALUE
13952vm_opt_not(CALL_INFO ci, CALL_CACHE cc, VALUE recv) {
13953 if (vm_method_cfunc_is(ci, cc, recv, rb_obj_not)) {
13954 return !(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0) ? ((VALUE)RUBY_Qfalse) : ((VALUE)RUBY_Qtrue);
13955 }
13956 else {
13957 return ((VALUE)RUBY_Qundef);
13958 }
13959}
13960static VALUE
13961vm_opt_regexpmatch1(VALUE recv, VALUE obj)
13962{
13963 if (((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MATCH)]&((1 << 8))) == 0), 1)))) {
13964 return rb_reg_match(recv, obj);
13965 }
13966 else {
13967 return __extension__({ const int rb_funcall_argc = (1); const VALUE rb_funcall_args[] = {obj}; const int rb_funcall_nargs = (int)(sizeof(rb_funcall_args) / sizeof(VALUE)); rb_funcallv(recv, idEqTilde, __builtin_choose_expr(__builtin_constant_p(rb_funcall_argc), (((rb_funcall_argc) == 0 ? (rb_funcall_nargs) <= 1 : (rb_funcall_argc) == (rb_funcall_nargs)) ? (rb_funcall_argc) : rb_varargs_bad_length(rb_funcall_argc, rb_funcall_nargs)), (((rb_funcall_argc) <= (rb_funcall_nargs)) ? (rb_funcall_argc) : (rb_fatal("argc(%d) exceeds actual arguments(%d)", rb_funcall_argc, rb_funcall_nargs), 0))), rb_funcall_nargs ? rb_funcall_args : ((void *)0)); });
13968 }
13969}
13970static VALUE
13971vm_opt_regexpmatch2(VALUE recv, VALUE obj)
13972{
13973 if (rb_class_of((VALUE)(recv)) == rb_cString &&
13974 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MATCH)]&((1 << 2))) == 0), 1)))) {
13975 return rb_reg_match(obj, recv);
13976 }
13977 else {
13978 return ((VALUE)RUBY_Qundef);
13979 }
13980}
13981rb_event_flag_t rb_iseq_event_flags(const rb_iseq_t *iseq, size_t pos);
13982__attribute__ ((__noinline__)) static void vm_trace(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, const VALUE *pc);
13983static inline void
13984vm_trace_hook(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, const VALUE *pc,
13985 rb_event_flag_t pc_events, rb_event_flag_t target_event,
13986 rb_hook_list_t *global_hooks, rb_hook_list_t *local_hooks, VALUE val)
13987{
13988 rb_event_flag_t event = pc_events & target_event;
13989 VALUE self = (((((reg_cfp)))->self));
13990 ((void)0);
13991 if (event & global_hooks->events) {
13992 reg_cfp->pc++;
13993 vm_dtrace(event, ec);
13994 rb_exec_event_hook_orig(ec, global_hooks, event, self, 0, 0, 0 , val, 0);
13995 reg_cfp->pc--;
13996 }
13997 if (local_hooks != ((void *)0)) {
13998 if (event & local_hooks->events) {
13999 reg_cfp->pc++;
14000 rb_exec_event_hook_orig(ec, local_hooks, event, self, 0, 0, 0 , val, 0);
14001 reg_cfp->pc--;
14002 }
14003 }
14004}
14005static void
14006vm_trace(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, const VALUE *pc)
14007{
14008 rb_event_flag_t enabled_flags = ruby_vm_event_flags & (0x0001 | 0x0002 | 0x0004 | 0x0008 | 0x0010| 0x0100| 0x0200| 0x010000| 0x020000);
14009 if (enabled_flags == 0 && ruby_vm_event_local_num == 0) {
14010 return;
14011 }
14012 else {
14013 const rb_iseq_t *iseq = reg_cfp->iseq;
14014 size_t pos = pc - iseq->body->iseq_encoded;
14015 rb_event_flag_t pc_events = rb_iseq_event_flags(iseq, pos);
14016 rb_hook_list_t *local_hooks = iseq->aux.exec.local_hooks;
14017 rb_event_flag_t local_hook_events = local_hooks != ((void *)0) ? local_hooks->events : 0;
14018 enabled_flags |= local_hook_events;
14019 ((void)0);
14020 if ((pc_events & enabled_flags) == 0) {
14021 return;
14022 }
14023 else if (ec->trace_arg != ((void *)0)) {
14024 return;
14025 }
14026 else {
14027 rb_hook_list_t *global_hooks = rb_vm_global_hooks(ec);
14028 if (0) {
14029 fprintf(stderr, "vm_trace>>%4d (%4x) - %s:%d %s\n",
14030 (int)pos,
14031 (int)pc_events,
14032 (!(((struct RBasic*)(rb_iseq_path(iseq)))->flags & RSTRING_NOEMBED) ? ((struct RString*)(rb_iseq_path(iseq)))->as.ary : ((struct RString*)(rb_iseq_path(iseq)))->as.heap.ptr),
14033 (int)rb_iseq_line_no(iseq, pos),
14034 (!(((struct RBasic*)(rb_iseq_label(iseq)))->flags & RSTRING_NOEMBED) ? ((struct RString*)(rb_iseq_label(iseq)))->as.ary : ((struct RString*)(rb_iseq_label(iseq)))->as.heap.ptr));
14035 }
14036 ((void)0);
14037 ((void)0);
14038 ((void)0);
14039 do { if ((pc_events & (0x0002 | 0x0008 | 0x0100)) & enabled_flags) { vm_trace_hook(ec, reg_cfp, pc, pc_events, (0x0002 | 0x0008 | 0x0100), global_hooks, local_hooks, (((VALUE)RUBY_Qundef))); } } while (0);
14040 do { if ((pc_events & (0x0001)) & enabled_flags) { vm_trace_hook(ec, reg_cfp, pc, pc_events, (0x0001), global_hooks, local_hooks, (((VALUE)RUBY_Qundef))); } } while (0);
14041 do { if ((pc_events & (0x010000)) & enabled_flags) { vm_trace_hook(ec, reg_cfp, pc, pc_events, (0x010000), global_hooks, local_hooks, (((VALUE)RUBY_Qundef))); } } while (0);
14042 do { if ((pc_events & (0x020000)) & enabled_flags) { vm_trace_hook(ec, reg_cfp, pc, pc_events, (0x020000), global_hooks, local_hooks, (((VALUE)RUBY_Qundef))); } } while (0);
14043 do { if ((pc_events & (0x0004 | 0x0010 | 0x0200)) & enabled_flags) { vm_trace_hook(ec, reg_cfp, pc, pc_events, (0x0004 | 0x0010 | 0x0200), global_hooks, local_hooks, ((*(((((reg_cfp)->sp)))-(0)-1)))); } } while (0);
14044 }
14045 }
14046}static inline
14047void Init_vm_stack_canary(void) { }
14049 VALUE tbl;
14050};
14051static inline VALUE method_missing(VALUE obj, ID id, int argc, const VALUE *argv, enum method_missing_reason call_status);
14052static inline VALUE vm_yield_with_cref(rb_execution_context_t *ec, int argc, const VALUE *argv, const rb_cref_t *cref, int is_lambda);
14053static inline VALUE vm_yield(rb_execution_context_t *ec, int argc, const VALUE *argv);
14054static inline VALUE vm_yield_with_block(rb_execution_context_t *ec, int argc, const VALUE *argv, VALUE block_handler);
14055static inline VALUE vm_yield_force_blockarg(rb_execution_context_t *ec, VALUE args);
14056VALUE rb_vm_exec(rb_execution_context_t *ec, int mjit_enable_p);
14057static void vm_set_eval_stack(rb_execution_context_t * th, const rb_iseq_t *iseq, const rb_cref_t *cref, const struct rb_block *base_block);
14058static int vm_collect_local_variables_in_heap(const VALUE *dfp, const struct local_var_list *vars);
14059static VALUE rb_eUncaughtThrow;
14060static ID id_result, id_tag, id_value;
14061typedef enum call_type {
14062 CALL_PUBLIC,
14063 CALL_FCALL,
14064 CALL_VCALL,
14065 CALL_TYPE_MAX
14066} call_type;
14067static VALUE send_internal(int argc, const VALUE *argv, VALUE recv, call_type scope);
14068static VALUE vm_call0_body(rb_execution_context_t* ec, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc, const VALUE *argv);
14069static inline void
14070stack_check(rb_execution_context_t *ec)
14071{
14072 if (!(((ec)->raised_flag & (RAISED_STACKOVERFLOW)) != 0) &&
14073 rb_ec_stack_check(ec)) {
14074 ((ec)->raised_flag |= (RAISED_STACKOVERFLOW));
14075 rb_ec_stack_overflow(ec, 0);
14076 }
14077}
14078static void
14079raise_method_missing(rb_execution_context_t *ec, int argc, const VALUE *argv, VALUE obj,
14080 enum method_missing_reason last_call_status)
14081{
14082 VALUE exc = rb_eNoMethodError;
14083 VALUE format = 0;
14084 if ((__builtin_expect(!!(argc == 0), 0))) {
14085 rb_raise(rb_eArgError, "no method name given");
14086 }
14087 else if ((__builtin_expect(!!(!((((VALUE)(argv[0])&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(argv[0]) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(argv[0]) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(argv[0]))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL)))), 0))) {
14088 const VALUE e = rb_eArgError;
14089 rb_raise(e, "method name must be a Symbol but %""l""i" "\v"" is given",
14090 rb_obj_class(argv[0]));
14091 }
14092 stack_check(ec);
14093 if (last_call_status & MISSING_PRIVATE) {
14094 format = rb_fstring_new(("private method `%s' called for %s%s%s"), (sizeof("private method `%s' called for %s%s%s" "") - 1));
14095 }
14096 else if (last_call_status & MISSING_PROTECTED) {
14097 format = rb_fstring_new(("protected method `%s' called for %s%s%s"), (sizeof("protected method `%s' called for %s%s%s" "") - 1));
14098 }
14099 else if (last_call_status & MISSING_VCALL) {
14100 format = rb_fstring_new(("undefined local variable or method `%s' for %s%s%s"), (sizeof("undefined local variable or method `%s' for %s%s%s" "") - 1));
14101 exc = rb_eNameError;
14102 }
14103 else if (last_call_status & MISSING_SUPER) {
14104 format = rb_fstring_new(("super: no superclass method `%s' for %s%s%s"), (sizeof("super: no superclass method `%s' for %s%s%s" "") - 1));
14105 }
14106 {
14107 exc = rb_make_no_method_exception(exc, format, obj, argc, argv,
14108 last_call_status & (MISSING_FCALL|MISSING_VCALL));
14109 if (!(last_call_status & MISSING_MISSING)) {
14110 rb_vm_pop_cfunc_frame();
14111 }
14112 rb_exc_raise(exc);
14113 }
14114}
14115static void
14116vm_raise_method_missing(rb_execution_context_t *ec, int argc, const VALUE *argv,
14117 VALUE obj, int call_status)
14118{
14119 vm_passed_block_handler_set(ec, 0);
14120 raise_method_missing(ec, argc, argv, obj, call_status | MISSING_MISSING);
14121}
14122static inline VALUE
14123method_missing(VALUE obj, ID id, int argc, const VALUE *argv, enum method_missing_reason call_status)
14124{
14125 VALUE *nargv, result, work, klass;
14126 rb_execution_context_t *ec = rb_current_execution_context();
14127 VALUE block_handler = vm_passed_block_handler(ec);
14129 ec->method_missing_reason = call_status;
14130 if (id == idMethodMissing) {
14131 missing:
14132 raise_method_missing(ec, argc, argv, obj, call_status | MISSING_MISSING);
14133 }
14134 nargv = ((VALUE*)(((size_t)(argc + 1) < 1024 / sizeof(VALUE)) ? ((work) = 0, __builtin_alloca ((size_t)(argc + 1) * sizeof(VALUE))) : rb_alloc_tmp_buffer2(&(work), (long)(argc + 1), sizeof(VALUE))));
14135 nargv[0] = (rb_id2sym(id));
14136 memcpy((nargv + 1), (argv), sizeof(VALUE)*(size_t)(argc));
14137 ++argc;
14138 argv = nargv;
14139 klass = rb_class_of((VALUE)(obj));
14140 if (!klass) goto missing;
14141 me = rb_callable_method_entry(klass, idMethodMissing);
14142 if (!me || (int) (((me)->flags & (((VALUE)RUBY_FL_USER6) )) >> ((((VALUE)RUBY_FL_USHIFT) + 4)+2))) goto missing;
14143 vm_passed_block_handler_set(ec, block_handler);
14144 result = rb_vm_call0(ec, obj, idMethodMissing, argc, argv, me);
14145 if (work) rb_free_tmp_buffer(&(work));
14146 return result;
14147}
14148static rb_control_frame_t *
14149vm_get_ruby_level_caller_cfp(const rb_execution_context_t *ec, const rb_control_frame_t *cfp)
14150{
14151 if (VM_FRAME_RUBYFRAME_P(cfp)) {
14152 return (rb_control_frame_t *)cfp;
14153 }
14154 cfp = ((cfp)+1);
14155 while (!RUBY_VM_CONTROL_FRAME_STACK_OVERFLOW_P(ec, cfp)) {
14156 if (VM_FRAME_RUBYFRAME_P(cfp)) {
14157 return (rb_control_frame_t *)cfp;
14158 }
14159 if (VM_ENV_FLAGS(cfp->ep, VM_FRAME_FLAG_PASSED) == 0) {
14160 break;
14161 }
14162 cfp = ((cfp)+1);
14163 }
14164 return 0;
14165}
14166static void
14167rb_vm_pop_cfunc_frame(void)
14168{
14169 rb_execution_context_t *ec = rb_current_execution_context();
14170 rb_control_frame_t *cfp = ec->cfp;
14171 const rb_callable_method_entry_t *me = rb_vm_frame_method_entry(cfp);
14172 do { const rb_event_flag_t flag_arg_ = (0x0040); rb_hook_list_t *hooks_arg_ = (rb_vm_global_hooks(ec)); if ((__builtin_expect(!!((hooks_arg_)->events & (flag_arg_)), 0))) { rb_exec_event_hook_orig(ec, hooks_arg_, flag_arg_, cfp->self, me->def->original_id, me->called_id, me->owner, ((VALUE)RUBY_Qnil), 0); } } while (0);
14173 do { if ((__builtin_expect(!!(0), 0))) { struct ruby_dtrace_method_hook_args args; if (rb_dtrace_setup(ec, me->owner, me->def->original_id, &args)) { do {} while (0); } } } while (0);
14174 vm_pop_frame(ec, cfp, cfp->ep);
14175}
14176static VALUE
14177vm_call_iseq_setup_normal_0start_0params_0locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
14178{
14179 return vm_call_iseq_setup_normal(ec, cfp, calling, cc->me, 0, 0, 0);
14180}
14181static VALUE
14182vm_call_iseq_setup_normal_0start_0params_1locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
14183{
14184 return vm_call_iseq_setup_normal(ec, cfp, calling, cc->me, 0, 0, 1);
14185}
14186static VALUE
14187vm_call_iseq_setup_normal_0start_0params_2locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
14188{
14189 return vm_call_iseq_setup_normal(ec, cfp, calling, cc->me, 0, 0, 2);
14190}
14191static VALUE
14192vm_call_iseq_setup_normal_0start_0params_3locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
14193{
14194 return vm_call_iseq_setup_normal(ec, cfp, calling, cc->me, 0, 0, 3);
14195}
14196static VALUE
14197vm_call_iseq_setup_normal_0start_0params_4locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
14198{
14199 return vm_call_iseq_setup_normal(ec, cfp, calling, cc->me, 0, 0, 4);
14200}
14201static VALUE
14202vm_call_iseq_setup_normal_0start_0params_5locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
14203{
14204 return vm_call_iseq_setup_normal(ec, cfp, calling, cc->me, 0, 0, 5);
14205}
14206static VALUE
14207vm_call_iseq_setup_normal_0start_1params_0locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
14208{
14209 return vm_call_iseq_setup_normal(ec, cfp, calling, cc->me, 0, 1, 0);
14210}
14211static VALUE
14212vm_call_iseq_setup_normal_0start_1params_1locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
14213{
14214 return vm_call_iseq_setup_normal(ec, cfp, calling, cc->me, 0, 1, 1);
14215}
14216static VALUE
14217vm_call_iseq_setup_normal_0start_1params_2locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
14218{
14219 return vm_call_iseq_setup_normal(ec, cfp, calling, cc->me, 0, 1, 2);
14220}
14221static VALUE
14222vm_call_iseq_setup_normal_0start_1params_3locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
14223{
14224 return vm_call_iseq_setup_normal(ec, cfp, calling, cc->me, 0, 1, 3);
14225}
14226static VALUE
14227vm_call_iseq_setup_normal_0start_1params_4locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
14228{
14229 return vm_call_iseq_setup_normal(ec, cfp, calling, cc->me, 0, 1, 4);
14230}
14231static VALUE
14232vm_call_iseq_setup_normal_0start_1params_5locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
14233{
14234 return vm_call_iseq_setup_normal(ec, cfp, calling, cc->me, 0, 1, 5);
14235}
14236static VALUE
14237vm_call_iseq_setup_normal_0start_2params_0locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
14238{
14239 return vm_call_iseq_setup_normal(ec, cfp, calling, cc->me, 0, 2, 0);
14240}
14241static VALUE
14242vm_call_iseq_setup_normal_0start_2params_1locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
14243{
14244 return vm_call_iseq_setup_normal(ec, cfp, calling, cc->me, 0, 2, 1);
14245}
14246static VALUE
14247vm_call_iseq_setup_normal_0start_2params_2locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
14248{
14249 return vm_call_iseq_setup_normal(ec, cfp, calling, cc->me, 0, 2, 2);
14250}
14251static VALUE
14252vm_call_iseq_setup_normal_0start_2params_3locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
14253{
14254 return vm_call_iseq_setup_normal(ec, cfp, calling, cc->me, 0, 2, 3);
14255}
14256static VALUE
14257vm_call_iseq_setup_normal_0start_2params_4locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
14258{
14259 return vm_call_iseq_setup_normal(ec, cfp, calling, cc->me, 0, 2, 4);
14260}
14261static VALUE
14262vm_call_iseq_setup_normal_0start_2params_5locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
14263{
14264 return vm_call_iseq_setup_normal(ec, cfp, calling, cc->me, 0, 2, 5);
14265}
14266static VALUE
14267vm_call_iseq_setup_normal_0start_3params_0locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
14268{
14269 return vm_call_iseq_setup_normal(ec, cfp, calling, cc->me, 0, 3, 0);
14270}
14271static VALUE
14272vm_call_iseq_setup_normal_0start_3params_1locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
14273{
14274 return vm_call_iseq_setup_normal(ec, cfp, calling, cc->me, 0, 3, 1);
14275}
14276static VALUE
14277vm_call_iseq_setup_normal_0start_3params_2locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
14278{
14279 return vm_call_iseq_setup_normal(ec, cfp, calling, cc->me, 0, 3, 2);
14280}
14281static VALUE
14282vm_call_iseq_setup_normal_0start_3params_3locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
14283{
14284 return vm_call_iseq_setup_normal(ec, cfp, calling, cc->me, 0, 3, 3);
14285}
14286static VALUE
14287vm_call_iseq_setup_normal_0start_3params_4locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
14288{
14289 return vm_call_iseq_setup_normal(ec, cfp, calling, cc->me, 0, 3, 4);
14290}
14291static VALUE
14292vm_call_iseq_setup_normal_0start_3params_5locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
14293{
14294 return vm_call_iseq_setup_normal(ec, cfp, calling, cc->me, 0, 3, 5);
14295}
14296static const vm_call_handler vm_call_iseq_handlers[][6] = {
14297{vm_call_iseq_setup_normal_0start_0params_0locals,
14298 vm_call_iseq_setup_normal_0start_0params_1locals,
14299 vm_call_iseq_setup_normal_0start_0params_2locals,
14300 vm_call_iseq_setup_normal_0start_0params_3locals,
14301 vm_call_iseq_setup_normal_0start_0params_4locals,
14302 vm_call_iseq_setup_normal_0start_0params_5locals},
14303{vm_call_iseq_setup_normal_0start_1params_0locals,
14304 vm_call_iseq_setup_normal_0start_1params_1locals,
14305 vm_call_iseq_setup_normal_0start_1params_2locals,
14306 vm_call_iseq_setup_normal_0start_1params_3locals,
14307 vm_call_iseq_setup_normal_0start_1params_4locals,
14308 vm_call_iseq_setup_normal_0start_1params_5locals},
14309{vm_call_iseq_setup_normal_0start_2params_0locals,
14310 vm_call_iseq_setup_normal_0start_2params_1locals,
14311 vm_call_iseq_setup_normal_0start_2params_2locals,
14312 vm_call_iseq_setup_normal_0start_2params_3locals,
14313 vm_call_iseq_setup_normal_0start_2params_4locals,
14314 vm_call_iseq_setup_normal_0start_2params_5locals},
14315{vm_call_iseq_setup_normal_0start_3params_0locals,
14316 vm_call_iseq_setup_normal_0start_3params_1locals,
14317 vm_call_iseq_setup_normal_0start_3params_2locals,
14318 vm_call_iseq_setup_normal_0start_3params_3locals,
14319 vm_call_iseq_setup_normal_0start_3params_4locals,
14320 vm_call_iseq_setup_normal_0start_3params_5locals}
14321};
14322static inline vm_call_handler
14323vm_call_iseq_setup_func(const struct rb_call_info *ci, const int param_size, const int local_size)
14324{
14325 if ((__builtin_expect(!!(ci->flag & (0x01 << VM_CALL_TAILCALL_bit)), 0))) {
14326 return &vm_call_iseq_setup_tailcall_0start;
14327 }
14328 else if (0) {
14329 return &vm_call_iseq_setup_normal_0start;
14330 }
14331 else {
14332 if (param_size <= 3 &&
14333 local_size <= 5) {
14334 ((void)0);
14335 return vm_call_iseq_handlers[param_size][local_size];
14336 }
14337 return &vm_call_iseq_setup_normal_0start;
14338 }
14339}
14340#define MJIT_HEADER 1
14341#define _FORTIFY_SOURCE 2
14342#define RUBY_EXPORT 1
14343#define CANONICALIZATION_FOR_MATHN 1
14344#define _STDC_PREDEF_H 1
14345#define __STDC_IEC_559__ 1
14346#define __STDC_IEC_559_COMPLEX__ 1
14347#define __STDC_ISO_10646__ 201706L
14348#define RUBY_INTERNAL_H 1
14349#define RUBY_H 1
14350#define HAVE_RUBY_DEFINES_H 1
14351#define HAVE_RUBY_ENCODING_H 1
14352#define HAVE_RUBY_INTERN_H 1
14353#define HAVE_RUBY_IO_H 1
14354#define HAVE_RUBY_MISSING_H 1
14355#define HAVE_RUBY_ONIGURUMA_H 1
14356#define HAVE_RUBY_RE_H 1
14357#define HAVE_RUBY_REGEX_H 1
14358#define HAVE_RUBY_RUBY_H 1
14359#define HAVE_RUBY_ST_H 1
14360#define HAVE_RUBY_THREAD_H 1
14361#define HAVE_RUBY_UTIL_H 1
14362#define HAVE_RUBY_VERSION_H 1
14363#define HAVE_RUBY_VM_H 1
14364#define RUBY_RUBY_H 1
14365#define INCLUDE_RUBY_CONFIG_H 1
14366#define STDC_HEADERS 1
14367#define HAVE_SYS_TYPES_H 1
14368#define HAVE_SYS_STAT_H 1
14369#define HAVE_STDLIB_H 1
14370#define HAVE_STRING_H 1
14371#define HAVE_MEMORY_H 1
14372#define HAVE_STRINGS_H 1
14373#define HAVE_INTTYPES_H 1
14374#define HAVE_STDINT_H 1
14375#define HAVE_UNISTD_H 1
14376#define __EXTENSIONS__ 1
14377#define _ALL_SOURCE 1
14378#define _GNU_SOURCE 1
14379#define _POSIX_PTHREAD_SEMANTICS 1
14380#define _TANDEM_SOURCE 1
14381#define RUBY_SYMBOL_EXPORT_BEGIN _Pragma("GCC visibility push(default)")
14382#define RUBY_SYMBOL_EXPORT_END _Pragma("GCC visibility pop")
14383#define HAVE_STMT_AND_DECL_IN_EXPR 1
14384#define HAVE_LIBCRYPT 1
14385#define HAVE_LIBDL 1
14386#define HAVE_DIRENT_H 1
14387#define HAVE__BOOL 1
14388#define HAVE_STDBOOL_H 1
14389#define HAVE_SYS_WAIT_H 1
14390#define HAVE_A_OUT_H 1
14391#define HAVE_GRP_H 1
14392#define HAVE_FCNTL_H 1
14393#define HAVE_FLOAT_H 1
14394#define HAVE_LANGINFO_H 1
14395#define HAVE_LIMITS_H 1
14396#define HAVE_LOCALE_H 1
14397#define HAVE_MALLOC_H 1
14398#define HAVE_PWD_H 1
14399#define HAVE_SANITIZER_ASAN_INTERFACE_H 1
14400#define HAVE_SANITIZER_MSAN_INTERFACE_H 1
14401#define HAVE_STDALIGN_H 1
14402#define HAVE_SYS_EVENTFD_H 1
14403#define HAVE_SYS_FCNTL_H 1
14404#define HAVE_SYS_FILE_H 1
14405#define HAVE_SYS_IOCTL_H 1
14406#define HAVE_SYS_PARAM_H 1
14407#define HAVE_SYS_PRCTL_H 1
14408#define HAVE_SYS_RESOURCE_H 1
14409#define HAVE_SYS_SELECT_H 1
14410#define HAVE_SYS_SENDFILE_H 1
14411#define HAVE_SYS_SOCKET_H 1
14412#define HAVE_SYS_SYSCALL_H 1
14413#define HAVE_SYS_SYSMACROS_H 1
14414#define HAVE_SYS_TIME_H 1
14415#define HAVE_SYS_TIMES_H 1
14416#define HAVE_SYS_UIO_H 1
14417#define HAVE_SYSCALL_H 1
14418#define HAVE_TIME_H 1
14419#define HAVE_UCONTEXT_H 1
14420#define HAVE_UTIME_H 1
14421#define HAVE_GMP_H 1
14422#define HAVE_LIBGMP 1
14423#define HAVE_TYPEOF 1
14424#define HAVE_LONG_LONG 1
14425#define HAVE_OFF_T 1
14426#define SIZEOF_INT 4
14427#define SIZEOF_SHORT 2
14428#define SIZEOF_LONG 8
14429#define SIZEOF_LONG_LONG 8
14430#define SIZEOF___INT64 0
14431#define SIZEOF___INT128 16
14432#define SIZEOF_OFF_T 8
14433#define SIZEOF_VOIDP 8
14434#define SIZEOF_FLOAT 4
14435#define SIZEOF_DOUBLE 8
14436#define SIZEOF_TIME_T 8
14437#define SIZEOF_CLOCK_T 8
14438#define PACKED_STRUCT(x) x __attribute__((packed))
14439#define USE_UNALIGNED_MEMBER_ACCESS 1
14440#define PRI_LL_PREFIX "ll"
14441#define HAVE_PID_T 1
14442#define rb_pid_t pid_t
14443#define SIGNEDNESS_OF_PID_T -1
14444#define PIDT2NUM(v) INT2NUM(v)
14445#define NUM2PIDT(v) NUM2INT(v)
14446#define PRI_PIDT_PREFIX PRI_INT_PREFIX
14447#define HAVE_UID_T 1
14448#define rb_uid_t uid_t
14449#define SIGNEDNESS_OF_UID_T +1
14450#define UIDT2NUM(v) UINT2NUM(v)
14451#define NUM2UIDT(v) NUM2UINT(v)
14452#define PRI_UIDT_PREFIX PRI_INT_PREFIX
14453#define HAVE_GID_T 1
14454#define rb_gid_t gid_t
14455#define SIGNEDNESS_OF_GID_T +1
14456#define GIDT2NUM(v) UINT2NUM(v)
14457#define NUM2GIDT(v) NUM2UINT(v)
14458#define PRI_GIDT_PREFIX PRI_INT_PREFIX
14459#define HAVE_TIME_T 1
14460#define rb_time_t time_t
14461#define SIGNEDNESS_OF_TIME_T -1
14462#define TIMET2NUM(v) LONG2NUM(v)
14463#define NUM2TIMET(v) NUM2LONG(v)
14464#define PRI_TIMET_PREFIX PRI_LONG_PREFIX
14465#define HAVE_DEV_T 1
14466#define rb_dev_t dev_t
14467#define SIGNEDNESS_OF_DEV_T +1
14468#define DEVT2NUM(v) ULONG2NUM(v)
14469#define NUM2DEVT(v) NUM2ULONG(v)
14470#define PRI_DEVT_PREFIX PRI_LONG_PREFIX
14471#define HAVE_MODE_T 1
14472#define rb_mode_t mode_t
14473#define SIGNEDNESS_OF_MODE_T +1
14474#define MODET2NUM(v) UINT2NUM(v)
14475#define NUM2MODET(v) NUM2UINT(v)
14476#define PRI_MODET_PREFIX PRI_INT_PREFIX
14477#define HAVE_RLIM_T 1
14478#define rb_rlim_t rlim_t
14479#define SIGNEDNESS_OF_RLIM_T +1
14480#define RLIM2NUM(v) ULONG2NUM(v)
14481#define NUM2RLIM(v) NUM2ULONG(v)
14482#define PRI_RLIM_PREFIX PRI_LONG_PREFIX
14483#define HAVE_OFF_T 1
14484#define rb_off_t off_t
14485#define SIGNEDNESS_OF_OFF_T -1
14486#define OFFT2NUM(v) LONG2NUM(v)
14487#define NUM2OFFT(v) NUM2LONG(v)
14488#define PRI_OFFT_PREFIX PRI_LONG_PREFIX
14489#define HAVE_CLOCKID_T 1
14490#define rb_clockid_t clockid_t
14491#define SIGNEDNESS_OF_CLOCKID_T -1
14492#define CLOCKID2NUM(v) INT2NUM(v)
14493#define NUM2CLOCKID(v) NUM2INT(v)
14494#define PRI_CLOCKID_PREFIX PRI_INT_PREFIX
14495#define HAVE_PROTOTYPES 1
14496#define TOKEN_PASTE(x,y) x ##y
14497#define STRINGIZE(expr) STRINGIZE0(expr)
14498#define HAVE_STDARG_PROTOTYPES 1
14499#define HAVE_VA_ARGS_MACRO 1
14500#define RUBY_ALIGNAS(x) __attribute__((__aligned__(x)))
14501#define RUBY_ALIGNOF alignof
14502#define CONSTFUNC(x) __attribute__ ((__const__)) x
14503#define PUREFUNC(x) __attribute__ ((__pure__)) x
14504#define NORETURN(x) __attribute__ ((__noreturn__)) x
14505#define DEPRECATED(x) __attribute__ ((__deprecated__)) x
14506#define DEPRECATED_BY(n,x) __attribute__ ((__deprecated__("by "#n))) x
14507#define DEPRECATED_TYPE(mesg,x) __attribute__ ((__deprecated__ mesg)) x
14508#define NOINLINE(x) __attribute__ ((__noinline__)) x
14509#define NO_SANITIZE(san,x) __attribute__ ((__no_sanitize__(san))) x
14510#define NO_SANITIZE_ADDRESS(x) __attribute__ ((__no_sanitize_address__)) x
14511#define NO_ADDRESS_SAFETY_ANALYSIS(x) __attribute__ ((__no_address_safety_analysis__)) x
14512#define WARN_UNUSED_RESULT(x) __attribute__ ((__warn_unused_result__)) x
14513#define MAYBE_UNUSED(x) __attribute__ ((__unused__)) x
14514#define ERRORFUNC(mesg,x) __attribute__ ((__error__ mesg)) x
14515#define WARNINGFUNC(mesg,x) __attribute__ ((__warning__ mesg)) x
14516#define WEAK(x) __attribute__ ((__weak__)) x
14517#define HAVE_FUNC_WEAK 1
14518#define FUNC_UNOPTIMIZED(x) __attribute__ ((__optimize__("O0"))) x
14519#define FUNC_MINIMIZED(x) __attribute__ ((__optimize__("-Os","-fomit-frame-pointer"))) x
14520#define HAVE_ATTRIBUTE_FUNCTION_ALIAS 1
14521#define RUBY_ALIAS_FUNCTION_TYPE(type,prot,name,args) type prot __attribute__((alias(#name)));
14522#define RUBY_ALIAS_FUNCTION_VOID(prot,name,args) RUBY_ALIAS_FUNCTION_TYPE(void, prot, name, args)
14523#define HAVE_GCC_ATOMIC_BUILTINS 1
14524#define HAVE_GCC_SYNC_BUILTINS 1
14525#define UNREACHABLE __builtin_unreachable()
14526#define RUBY_FUNC_EXPORTED __attribute__ ((__visibility__("default"))) extern
14527#define RUBY_FUNCTION_NAME_STRING __func__
14528#define ENUM_OVER_INT 1
14529#define HAVE_DECL_SYS_NERR 0
14530#define HAVE_DECL_GETENV 1
14531#define SIZEOF_SIZE_T 8
14532#define SIZEOF_PTRDIFF_T 8
14533#define PRI_SIZE_PREFIX "z"
14534#define PRI_PTRDIFF_PREFIX "t"
14535#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
14536#define HAVE_ST_BLKSIZE 1
14537#define HAVE_STRUCT_STAT_ST_BLOCKS 1
14538#define HAVE_ST_BLOCKS 1
14539#define HAVE_STRUCT_STAT_ST_RDEV 1
14540#define HAVE_ST_RDEV 1
14541#define SIZEOF_STRUCT_STAT_ST_SIZE SIZEOF_OFF_T
14542#define SIZEOF_STRUCT_STAT_ST_BLOCKS SIZEOF_OFF_T
14543#define SIZEOF_STRUCT_STAT_ST_INO SIZEOF_LONG
14544#define HAVE_STRUCT_STAT_ST_ATIM 1
14545#define HAVE_STRUCT_STAT_ST_MTIM 1
14546#define HAVE_STRUCT_STAT_ST_CTIM 1
14547#define HAVE_STRUCT_TIMEVAL 1
14548#define SIZEOF_STRUCT_TIMEVAL_TV_SEC SIZEOF_TIME_T
14549#define HAVE_STRUCT_TIMESPEC 1
14550#define HAVE_STRUCT_TIMEZONE 1
14551#define HAVE_RB_FD_INIT 1
14552#define HAVE_INT8_T 1
14553#define SIZEOF_INT8_T 1
14554#define HAVE_UINT8_T 1
14555#define SIZEOF_UINT8_T 1
14556#define HAVE_INT16_T 1
14557#define SIZEOF_INT16_T 2
14558#define HAVE_UINT16_T 1
14559#define SIZEOF_UINT16_T 2
14560#define HAVE_INT32_T 1
14561#define SIZEOF_INT32_T 4
14562#define HAVE_UINT32_T 1
14563#define SIZEOF_UINT32_T 4
14564#define HAVE_INT64_T 1
14565#define SIZEOF_INT64_T 8
14566#define HAVE_UINT64_T 1
14567#define SIZEOF_UINT64_T 8
14568#define HAVE_INT128_T 1
14569#define int128_t __int128
14570#define SIZEOF_INT128_T SIZEOF___INT128
14571#define HAVE_UINT128_T 1
14572#define uint128_t unsigned __int128
14573#define SIZEOF_UINT128_T SIZEOF___INT128
14574#define HAVE_INTPTR_T 1
14575#define SIZEOF_INTPTR_T 8
14576#define HAVE_UINTPTR_T 1
14577#define SIZEOF_UINTPTR_T 8
14578#define HAVE_SSIZE_T 1
14579#define SIZEOF_SSIZE_T 8
14580#define STACK_END_ADDRESS __libc_stack_end
14581#define GETGROUPS_T gid_t
14582#define RETSIGTYPE void
14583#define HAVE_ALLOCA_H 1
14584#define HAVE_ALLOCA 1
14585#define HAVE_ACOSH 1
14586#define HAVE_CBRT 1
14587#define HAVE_CRYPT 1
14588#define HAVE_DUP2 1
14589#define HAVE_ERF 1
14590#define HAVE_EXPLICIT_BZERO 1
14591#define HAVE_FFS 1
14592#define HAVE_FINITE 1
14593#define HAVE_FLOCK 1
14594#define HAVE_HYPOT 1
14595#define HAVE_ISINF 1
14596#define HAVE_ISNAN 1
14597#define HAVE_LGAMMA_R 1
14598#define HAVE_MEMMOVE 1
14599#define HAVE_NAN 1
14600#define HAVE_NEXTAFTER 1
14601#define HAVE_STRCHR 1
14602#define HAVE_STRERROR 1
14603#define HAVE_STRSTR 1
14604#define HAVE_TGAMMA 1
14605#define SPT_TYPE SPT_REUSEARGV
14606#define HAVE_SIGNBIT 1
14607#define HAVE_FORK 1
14608#define HAVE_VFORK 1
14609#define HAVE_WORKING_VFORK 1
14610#define HAVE_WORKING_FORK 1
14611#define HAVE__LONGJMP 1
14612#define HAVE_ATAN2L 1
14613#define HAVE_ATAN2F 1
14614#define HAVE_CHROOT 1
14615#define HAVE_CLOCK_GETTIME 1
14616#define HAVE_COSH 1
14617#define HAVE_CRYPT_R 1
14618#define HAVE_DIRFD 1
14619#define HAVE_DL_ITERATE_PHDR 1
14620#define HAVE_DLOPEN 1
14621#define HAVE_DLADDR 1
14622#define HAVE_DUP 1
14623#define HAVE_DUP3 1
14624#define HAVE_EACCESS 1
14625#define HAVE_ENDGRENT 1
14626#define HAVE_EVENTFD 1
14627#define HAVE_FCHMOD 1
14628#define HAVE_FCHOWN 1
14629#define HAVE_FCNTL 1
14630#define HAVE_FDATASYNC 1
14631#define HAVE_FDOPENDIR 1
14632#define HAVE_FMOD 1
14633#define HAVE_FSTATAT 1
14634#define HAVE_FSYNC 1
14635#define HAVE_FTRUNCATE 1
14636#define HAVE_FTRUNCATE64 1
14637#define HAVE_GETCWD 1
14638#define HAVE_GETGRNAM 1
14639#define HAVE_GETGRNAM_R 1
14640#define HAVE_GETGROUPS 1
14641#define HAVE_GETPGID 1
14642#define HAVE_GETPGRP 1
14643#define HAVE_GETPRIORITY 1
14644#define HAVE_GETPWNAM_R 1
14645#define HAVE_GETRESGID 1
14646#define HAVE_GETRESUID 1
14647#define HAVE_GETRLIMIT 1
14648#define HAVE_GETSID 1
14649#define HAVE_GETTIMEOFDAY 1
14650#define HAVE_GMTIME_R 1
14651#define HAVE_GRANTPT 1
14652#define HAVE_INITGROUPS 1
14653#define HAVE_IOCTL 1
14654#define HAVE_KILLPG 1
14655#define HAVE_LCHMOD 1
14656#define HAVE_LCHOWN 1
14657#define HAVE_LINK 1
14658#define HAVE_LLABS 1
14659#define HAVE_LOCKF 1
14660#define HAVE_LOG2 1
14661#define HAVE_LSTAT 1
14662#define HAVE_LUTIMES 1
14663#define HAVE_MALLOC_USABLE_SIZE 1
14664#define HAVE_MBLEN 1
14665#define HAVE_MEMALIGN 1
14666#define HAVE_WRITEV 1
14667#define HAVE_MEMRCHR 1
14668#define HAVE_MEMMEM 1
14669#define HAVE_MKFIFO 1
14670#define HAVE_MKNOD 1
14671#define HAVE_MKTIME 1
14672#define HAVE_OPENAT 1
14673#define HAVE_PIPE2 1
14674#define HAVE_POLL 1
14675#define HAVE_POSIX_FADVISE 1
14676#define HAVE_POSIX_MEMALIGN 1
14677#define HAVE_PPOLL 1
14678#define HAVE_PREAD 1
14679#define HAVE_PWRITE 1
14680#define HAVE_QSORT_R 1
14681#define HAVE_READLINK 1
14682#define HAVE_ROUND 1
14683#define HAVE_SCHED_GETAFFINITY 1
14684#define HAVE_SEEKDIR 1
14685#define HAVE_SENDFILE 1
14686#define HAVE_SETEGID 1
14687#define HAVE_SETENV 1
14688#define HAVE_SETEUID 1
14689#define HAVE_SETGID 1
14690#define HAVE_SETGROUPS 1
14691#define HAVE_SETPGID 1
14692#define HAVE_SETPGRP 1
14693#define HAVE_SETREGID 1
14694#define HAVE_SETRESGID 1
14695#define HAVE_SETRESUID 1
14696#define HAVE_SETREUID 1
14697#define HAVE_SETRLIMIT 1
14698#define HAVE_SETSID 1
14699#define HAVE_SETUID 1
14700#define HAVE_SHUTDOWN 1
14701#define HAVE_SIGACTION 1
14702#define HAVE_SIGALTSTACK 1
14703#define HAVE_SIGPROCMASK 1
14704#define HAVE_SINH 1
14705#define HAVE_SYMLINK 1
14706#define HAVE_SYSCALL 1
14707#define HAVE_SYSCONF 1
14708#define HAVE_TANH 1
14709#define HAVE_TELLDIR 1
14710#define HAVE_TIMEGM 1
14711#define HAVE_TIMES 1
14712#define HAVE_TRUNCATE 1
14713#define HAVE_TRUNCATE64 1
14714#define HAVE_UNSETENV 1
14715#define HAVE_UTIMENSAT 1
14716#define HAVE_UTIMES 1
14717#define HAVE_WAIT4 1
14718#define HAVE_WAITPID 1
14719#define HAVE_CRYPT_H 1
14720#define HAVE_STRUCT_CRYPT_DATA_INITIALIZED 1
14721#define HAVE_BUILTIN___BUILTIN_ALLOCA_WITH_ALIGN 1
14722#define HAVE_BUILTIN___BUILTIN_ASSUME_ALIGNED 1
14723#define HAVE_BUILTIN___BUILTIN_BSWAP16 1
14724#define HAVE_BUILTIN___BUILTIN_BSWAP32 1
14725#define HAVE_BUILTIN___BUILTIN_BSWAP64 1
14726#define HAVE_BUILTIN___BUILTIN_POPCOUNT 1
14727#define HAVE_BUILTIN___BUILTIN_POPCOUNTLL 1
14728#define HAVE_BUILTIN___BUILTIN_CLZ 1
14729#define HAVE_BUILTIN___BUILTIN_CLZL 1
14730#define HAVE_BUILTIN___BUILTIN_CLZLL 1
14731#define HAVE_BUILTIN___BUILTIN_CTZ 1
14732#define HAVE_BUILTIN___BUILTIN_CTZLL 1
14733#define HAVE_BUILTIN___BUILTIN_ADD_OVERFLOW 1
14734#define HAVE_BUILTIN___BUILTIN_SUB_OVERFLOW 1
14735#define HAVE_BUILTIN___BUILTIN_MUL_OVERFLOW 1
14736#define HAVE_BUILTIN___BUILTIN_MUL_OVERFLOW_P 1
14737#define HAVE_BUILTIN___BUILTIN_CONSTANT_P 1
14738#define HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR 1
14739#define HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR_CONSTANT_P 1
14740#define HAVE_BUILTIN___BUILTIN_TYPES_COMPATIBLE_P 1
14741#define HAVE_BUILTIN___BUILTIN_TRAP 1
14742#define HAVE_GNU_QSORT_R 1
14743#define ATAN2_INF_C99 1
14744#define HAVE_CLOCK_GETRES 1
14745#define HAVE_LIBRT 1
14746#define HAVE_LIBRT 1
14747#define HAVE_TIMER_CREATE 1
14748#define HAVE_TIMER_SETTIME 1
14749#define HAVE_STRUCT_TM_TM_ZONE 1
14750#define HAVE_TM_ZONE 1
14751#define HAVE_STRUCT_TM_TM_GMTOFF 1
14752#define HAVE_DAYLIGHT 1
14753#define NEGATIVE_TIME_T 1
14754#define POSIX_SIGNAL 1
14755#define HAVE_SIG_T 1
14756#define RSHIFT(x,y) ((x)>>(int)(y))
14757#define HAVE__SC_CLK_TCK 1
14758#define STACK_GROW_DIRECTION -1
14759#define FIBER_USE_COROUTINE "coroutine/amd64/Context.h"
14760#define _REENTRANT 1
14761#define _THREAD_SAFE 1
14762#define HAVE_LIBPTHREAD 1
14763#define HAVE_SCHED_YIELD 1
14764#define HAVE_PTHREAD_ATTR_SETINHERITSCHED 1
14765#define HAVE_PTHREAD_ATTR_GETSTACK 1
14766#define HAVE_PTHREAD_ATTR_GETGUARDSIZE 1
14767#define HAVE_PTHREAD_CONDATTR_SETCLOCK 1
14768#define HAVE_PTHREAD_SIGMASK 1
14769#define HAVE_PTHREAD_SETNAME_NP 1
14770#define HAVE_PTHREAD_GETATTR_NP 1
14771#define SET_CURRENT_THREAD_NAME(name) pthread_setname_np(pthread_self(), name)
14772#define SET_ANOTHER_THREAD_NAME(thid,name) pthread_setname_np(thid, name)
14773#define DEFINE_MCONTEXT_PTR(mc,uc) mcontext_t *mc = &(uc)->uc_mcontext
14774#define HAVE_GETCONTEXT 1
14775#define HAVE_SETCONTEXT 1
14776#define USE_ELF 1
14777#define HAVE_ELF_H 1
14778#define HAVE_LIBZ 1
14779#define HAVE_BACKTRACE 1
14780#define HAVE_VALGRIND_MEMCHECK_H 1
14781#define DLEXT_MAXLEN 3
14782#define DLEXT ".so"
14783#define HAVE__SETJMP 1
14784#define RUBY_SETJMP(env) __builtin_setjmp((env))
14785#define RUBY_LONGJMP(env,val) __builtin_longjmp((env),val)
14786#define RUBY_JMP_BUF jmp_buf
14787#define USE_MJIT 1
14788#define HAVE_PTHREAD_H 1
14789#define RUBY_PLATFORM "x86_64-linux"
14790#define RUBY_DEFINES_H 1
14791#define HAVE_ATTRIBUTE_ERRORFUNC 1
14792#define HAVE_ATTRIBUTE_WARNINGFUNC 1
14793#define GCC_VERSION_SINCE(major,minor,patchlevel) ((__GNUC__ > (major)) || ((__GNUC__ == (major) && ((__GNUC_MINOR__ > (minor)) || (__GNUC_MINOR__ == (minor) && __GNUC_PATCHLEVEL__ >= (patchlevel))))))
14794#define GCC_VERSION_BEFORE(major,minor,patchlevel) ((__GNUC__ < (major)) || ((__GNUC__ == (major) && ((__GNUC_MINOR__ < (minor)) || (__GNUC_MINOR__ == (minor) && __GNUC_PATCHLEVEL__ <= (patchlevel))))))
14795#define RB_LIKELY(x) (__builtin_expect(!!(x), 1))
14796#define RB_UNLIKELY(x) (__builtin_expect(!!(x), 0))
14797#define COLDFUNC __attribute__((cold))
14798#define PRINTF_ARGS(decl,string_index,first_to_check) decl __attribute__((format(printf, string_index, first_to_check)))
14799#define RB_GNUC_EXTENSION __extension__
14800#define RB_GNUC_EXTENSION_BLOCK(x) __extension__ ({ x; })
14801#define _STDIO_H 1
14802#define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
14803#undef __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
14804#define _FEATURES_H 1
14805#undef __USE_ISOC11
14806#undef __USE_ISOC99
14807#undef __USE_ISOC95
14808#undef __USE_ISOCXX11
14809#undef __USE_POSIX
14810#undef __USE_POSIX2
14811#undef __USE_POSIX199309
14812#undef __USE_POSIX199506
14813#undef __USE_XOPEN
14814#undef __USE_XOPEN_EXTENDED
14815#undef __USE_UNIX98
14816#undef __USE_XOPEN2K
14817#undef __USE_XOPEN2KXSI
14818#undef __USE_XOPEN2K8
14819#undef __USE_XOPEN2K8XSI
14820#undef __USE_LARGEFILE
14821#undef __USE_LARGEFILE64
14822#undef __USE_FILE_OFFSET64
14823#undef __USE_MISC
14824#undef __USE_ATFILE
14825#undef __USE_GNU
14826#undef __USE_FORTIFY_LEVEL
14827#undef __KERNEL_STRICT_NAMES
14828#undef __GLIBC_USE_ISOC2X
14829#undef __GLIBC_USE_DEPRECATED_GETS
14830#undef __GLIBC_USE_DEPRECATED_SCANF
14831#define __KERNEL_STRICT_NAMES
14832#define __GNUC_PREREQ(maj,min) ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
14833#define __glibc_clang_prereq(maj,min) 0
14834#define __GLIBC_USE(F) __GLIBC_USE_ ## F
14835#undef _ISOC95_SOURCE
14836#define _ISOC95_SOURCE 1
14837#undef _ISOC99_SOURCE
14838#define _ISOC99_SOURCE 1
14839#undef _ISOC11_SOURCE
14840#define _ISOC11_SOURCE 1
14841#undef _ISOC2X_SOURCE
14842#define _ISOC2X_SOURCE 1
14843#undef _POSIX_SOURCE
14844#define _POSIX_SOURCE 1
14845#undef _POSIX_C_SOURCE
14846#define _POSIX_C_SOURCE 200809L
14847#undef _XOPEN_SOURCE
14848#define _XOPEN_SOURCE 700
14849#undef _XOPEN_SOURCE_EXTENDED
14850#define _XOPEN_SOURCE_EXTENDED 1
14851#undef _LARGEFILE64_SOURCE
14852#define _LARGEFILE64_SOURCE 1
14853#undef _DEFAULT_SOURCE
14854#define _DEFAULT_SOURCE 1
14855#undef _ATFILE_SOURCE
14856#define _ATFILE_SOURCE 1
14857#undef _DEFAULT_SOURCE
14858#define _DEFAULT_SOURCE 1
14859#define __GLIBC_USE_ISOC2X 1
14860#define __USE_ISOC11 1
14861#define __USE_ISOC99 1
14862#define __USE_ISOC95 1
14863#undef _POSIX_SOURCE
14864#define _POSIX_SOURCE 1
14865#undef _POSIX_C_SOURCE
14866#define _POSIX_C_SOURCE 200809L
14867#define __USE_POSIX 1
14868#define __USE_POSIX2 1
14869#define __USE_POSIX199309 1
14870#define __USE_POSIX199506 1
14871#define __USE_XOPEN2K 1
14872#undef __USE_ISOC95
14873#define __USE_ISOC95 1
14874#undef __USE_ISOC99
14875#define __USE_ISOC99 1
14876#define __USE_XOPEN2K8 1
14877#undef _ATFILE_SOURCE
14878#define _ATFILE_SOURCE 1
14879#define __USE_XOPEN 1
14880#define __USE_XOPEN_EXTENDED 1
14881#define __USE_UNIX98 1
14882#undef _LARGEFILE_SOURCE
14883#define _LARGEFILE_SOURCE 1
14884#define __USE_XOPEN2K8 1
14885#define __USE_XOPEN2K8XSI 1
14886#define __USE_XOPEN2K 1
14887#define __USE_XOPEN2KXSI 1
14888#undef __USE_ISOC95
14889#define __USE_ISOC95 1
14890#undef __USE_ISOC99
14891#define __USE_ISOC99 1
14892#define __USE_LARGEFILE 1
14893#define __USE_LARGEFILE64 1
14894#define __USE_MISC 1
14895#define __USE_ATFILE 1
14896#define __USE_GNU 1
14897#define __USE_FORTIFY_LEVEL 2
14898#define __GLIBC_USE_DEPRECATED_GETS 0
14899#define __GLIBC_USE_DEPRECATED_SCANF 0
14900#undef __GNU_LIBRARY__
14901#define __GNU_LIBRARY__ 6
14902#define __GLIBC__ 2
14903#define __GLIBC_MINOR__ 32
14904#define __GLIBC_PREREQ(maj,min) ((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min))
14905#define _SYS_CDEFS_H 1
14906#undef __P
14907#undef __PMT
14908#define __LEAF , __leaf__
14909#define __LEAF_ATTR __attribute__ ((__leaf__))
14910#define __THROW __attribute__ ((__nothrow__ __LEAF))
14911#define __THROWNL __attribute__ ((__nothrow__))
14912#define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
14913#define __NTHNL(fct) __attribute__ ((__nothrow__)) fct
14914#define __glibc_clang_has_extension(ext) 0
14915#define __P(args) args
14916#define __PMT(args) args
14917#define __CONCAT(x,y) x ## y
14918#define __STRING(x) #x
14919#define __ptr_t void *
14920#define __BEGIN_DECLS
14921#define __END_DECLS
14922#define __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1)
14923#define __bos0(ptr) __builtin_object_size (ptr, 0)
14924#define __warndecl(name,msg) extern void name (void) __attribute__((__warning__ (msg)))
14925#define __warnattr(msg) __attribute__((__warning__ (msg)))
14926#define __errordecl(name,msg) extern void name (void) __attribute__((__error__ (msg)))
14927#define __flexarr []
14928#define __glibc_c99_flexarr_available 1
14929#define __REDIRECT(name,proto,alias) name proto __asm__ (__ASMNAME (#alias))
14930#define __REDIRECT_NTH(name,proto,alias) name proto __asm__ (__ASMNAME (#alias)) __THROW
14931#define __REDIRECT_NTHNL(name,proto,alias) name proto __asm__ (__ASMNAME (#alias)) __THROWNL
14932#define __ASMNAME(cname) __ASMNAME2 (__USER_LABEL_PREFIX__, cname)
14933#define __ASMNAME2(prefix,cname) __STRING (prefix) cname
14934#define __attribute_malloc__ __attribute__ ((__malloc__))
14935#define __attribute_alloc_size__(params) __attribute__ ((__alloc_size__ params))
14936#define __attribute_pure__ __attribute__ ((__pure__))
14937#define __attribute_const__ __attribute__ ((__const__))
14938#define __attribute_used__ __attribute__ ((__used__))
14939#define __attribute_noinline__ __attribute__ ((__noinline__))
14940#define __attribute_deprecated__ __attribute__ ((__deprecated__))
14941#define __attribute_deprecated_msg__(msg) __attribute__ ((__deprecated__ (msg)))
14942#define __attribute_format_arg__(x) __attribute__ ((__format_arg__ (x)))
14943#define __attribute_format_strfmon__(a,b) __attribute__ ((__format__ (__strfmon__, a, b)))
14944#define __nonnull(params) __attribute__ ((__nonnull__ params))
14945#define __attribute_warn_unused_result__ __attribute__ ((__warn_unused_result__))
14946#define __wur __attribute_warn_unused_result__
14947#undef __always_inline
14948#define __always_inline __inline __attribute__ ((__always_inline__))
14949#define __attribute_artificial__ __attribute__ ((__artificial__))
14950#define __extern_inline extern __inline __attribute__ ((__gnu_inline__))
14951#define __extern_always_inline extern __always_inline __attribute__ ((__gnu_inline__))
14952#define __fortify_function __extern_always_inline __attribute_artificial__
14953#define __va_arg_pack() __builtin_va_arg_pack ()
14954#define __va_arg_pack_len() __builtin_va_arg_pack_len ()
14955#define __restrict_arr __restrict
14956#define __glibc_unlikely(cond) __builtin_expect ((cond), 0)
14957#define __glibc_likely(cond) __builtin_expect ((cond), 1)
14958#define __glibc_has_attribute(attr) __has_attribute (attr)
14959#define __attribute_nonstring__ __attribute__ ((__nonstring__))
14960#undef __attribute_copy__
14961#define __attribute_copy__(arg) __attribute__ ((__copy__ (arg)))
14962#define __WORDSIZE 64
14963#define __WORDSIZE_TIME64_COMPAT32 1
14964#define __SYSCALL_WORDSIZE 64
14965#define __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI 0
14966#define __LDBL_REDIR1(name,proto,alias) name proto
14967#define __LDBL_REDIR(name,proto) name proto
14968#define __LDBL_REDIR1_NTH(name,proto,alias) name proto __THROW
14969#define __LDBL_REDIR_NTH(name,proto) name proto __THROW
14970#define __LDBL_REDIR2_DECL(name)
14971#define __LDBL_REDIR_DECL(name)
14972#define __REDIRECT_LDBL(name,proto,alias) __REDIRECT (name, proto, alias)
14973#define __REDIRECT_NTH_LDBL(name,proto,alias) __REDIRECT_NTH (name, proto, alias)
14974#define __glibc_macro_warning1(message) _Pragma (#message)
14975#define __glibc_macro_warning(message) __glibc_macro_warning1 (GCC warning message)
14976#define __HAVE_GENERIC_SELECTION 1
14977#define __attr_access(x) __attribute__ ((__access__ x))
14978#define __USE_EXTERN_INLINES 1
14979#define __stub___compat_bdflush
14980#define __stub_chflags
14981#define __stub_fchflags
14982#define __stub_gtty
14983#define __stub_revoke
14984#define __stub_setlogin
14985#define __stub_sigreturn
14986#define __stub_stty
14987#undef __GLIBC_USE_LIB_EXT2
14988#define __GLIBC_USE_LIB_EXT2 1
14989#undef __GLIBC_USE_IEC_60559_BFP_EXT
14990#define __GLIBC_USE_IEC_60559_BFP_EXT 1
14991#undef __GLIBC_USE_IEC_60559_BFP_EXT_C2X
14992#define __GLIBC_USE_IEC_60559_BFP_EXT_C2X 1
14993#undef __GLIBC_USE_IEC_60559_FUNCS_EXT
14994#define __GLIBC_USE_IEC_60559_FUNCS_EXT 1
14995#undef __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X
14996#define __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X 1
14997#undef __GLIBC_USE_IEC_60559_TYPES_EXT
14998#define __GLIBC_USE_IEC_60559_TYPES_EXT 1
14999#define __need_size_t
15000#define __need_NULL
15001#define __size_t__
15002#define __SIZE_T__
15003#define _SIZE_T
15004#define _SYS_SIZE_T_H
15005#define _T_SIZE_
15006#define _T_SIZE
15007#define __SIZE_T
15008#define _SIZE_T_
15009#define _BSD_SIZE_T_
15010#define _SIZE_T_DEFINED_
15011#define _SIZE_T_DEFINED
15012#define _BSD_SIZE_T_DEFINED_
15013#define _SIZE_T_DECLARED
15014#define ___int_size_t_h
15015#define _GCC_SIZE_T
15016#define _SIZET_
15017#define __size_t
15018#undef __need_size_t
15019#undef NULL
15020#define NULL ((void *)0)
15021#undef __need_NULL
15022#define __need___va_list
15023#undef __need___va_list
15024#define __GNUC_VA_LIST
15025#define _BITS_TYPES_H 1
15026#define __WORDSIZE 64
15027#define __WORDSIZE_TIME64_COMPAT32 1
15028#define __SYSCALL_WORDSIZE 64
15029#define __TIMESIZE __WORDSIZE
15030#define __S16_TYPE short int
15031#define __U16_TYPE unsigned short int
15032#define __S32_TYPE int
15033#define __U32_TYPE unsigned int
15034#define __SLONGWORD_TYPE long int
15035#define __ULONGWORD_TYPE unsigned long int
15036#define __SQUAD_TYPE long int
15037#define __UQUAD_TYPE unsigned long int
15038#define __SWORD_TYPE long int
15039#define __UWORD_TYPE unsigned long int
15040#define __SLONG32_TYPE int
15041#define __ULONG32_TYPE unsigned int
15042#define __S64_TYPE long int
15043#define __U64_TYPE unsigned long int
15044#define __STD_TYPE typedef
15045#define _BITS_TYPESIZES_H 1
15046#define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE
15047#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE
15048#define __DEV_T_TYPE __UQUAD_TYPE
15049#define __UID_T_TYPE __U32_TYPE
15050#define __GID_T_TYPE __U32_TYPE
15051#define __INO_T_TYPE __SYSCALL_ULONG_TYPE
15052#define __INO64_T_TYPE __UQUAD_TYPE
15053#define __MODE_T_TYPE __U32_TYPE
15054#define __NLINK_T_TYPE __SYSCALL_ULONG_TYPE
15055#define __FSWORD_T_TYPE __SYSCALL_SLONG_TYPE
15056#define __OFF_T_TYPE __SYSCALL_SLONG_TYPE
15057#define __OFF64_T_TYPE __SQUAD_TYPE
15058#define __PID_T_TYPE __S32_TYPE
15059#define __RLIM_T_TYPE __SYSCALL_ULONG_TYPE
15060#define __RLIM64_T_TYPE __UQUAD_TYPE
15061#define __BLKCNT_T_TYPE __SYSCALL_SLONG_TYPE
15062#define __BLKCNT64_T_TYPE __SQUAD_TYPE
15063#define __FSBLKCNT_T_TYPE __SYSCALL_ULONG_TYPE
15064#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE
15065#define __FSFILCNT_T_TYPE __SYSCALL_ULONG_TYPE
15066#define __FSFILCNT64_T_TYPE __UQUAD_TYPE
15067#define __ID_T_TYPE __U32_TYPE
15068#define __CLOCK_T_TYPE __SYSCALL_SLONG_TYPE
15069#define __TIME_T_TYPE __SYSCALL_SLONG_TYPE
15070#define __USECONDS_T_TYPE __U32_TYPE
15071#define __SUSECONDS_T_TYPE __SYSCALL_SLONG_TYPE
15072#define __SUSECONDS64_T_TYPE __SQUAD_TYPE
15073#define __DADDR_T_TYPE __S32_TYPE
15074#define __KEY_T_TYPE __S32_TYPE
15075#define __CLOCKID_T_TYPE __S32_TYPE
15076#define __TIMER_T_TYPE void *
15077#define __BLKSIZE_T_TYPE __SYSCALL_SLONG_TYPE
15078#define __FSID_T_TYPE struct { int __val[2]; }
15079#define __SSIZE_T_TYPE __SWORD_TYPE
15080#define __CPU_MASK_TYPE __SYSCALL_ULONG_TYPE
15081#define __OFF_T_MATCHES_OFF64_T 1
15082#define __INO_T_MATCHES_INO64_T 1
15083#define __RLIM_T_MATCHES_RLIM64_T 1
15084#define __STATFS_MATCHES_STATFS64 1
15085#define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 1
15086#define __FD_SETSIZE 1024
15087#define _BITS_TIME64_H 1
15088#define __TIME64_T_TYPE __TIME_T_TYPE
15089#undef __STD_TYPE
15090#define _____fpos_t_defined 1
15091#define ____mbstate_t_defined 1
15092#define _____fpos64_t_defined 1
15093#define ____FILE_defined 1
15094#define __FILE_defined 1
15095#define __struct_FILE_defined 1
15096#define __getc_unlocked_body(_fp) (__glibc_unlikely ((_fp)->_IO_read_ptr >= (_fp)->_IO_read_end) ? __uflow (_fp) : *(unsigned char *) (_fp)->_IO_read_ptr++)
15097#define __putc_unlocked_body(_ch,_fp) (__glibc_unlikely ((_fp)->_IO_write_ptr >= (_fp)->_IO_write_end) ? __overflow (_fp, (unsigned char) (_ch)) : (unsigned char) (*(_fp)->_IO_write_ptr++ = (_ch)))
15098#define _IO_EOF_SEEN 0x0010
15099#define __feof_unlocked_body(_fp) (((_fp)->_flags & _IO_EOF_SEEN) != 0)
15100#define _IO_ERR_SEEN 0x0020
15101#define __ferror_unlocked_body(_fp) (((_fp)->_flags & _IO_ERR_SEEN) != 0)
15102#define _IO_USER_LOCK 0x8000
15103#define __cookie_io_functions_t_defined 1
15104#define _VA_LIST_DEFINED
15105#define __off_t_defined
15106#define __off64_t_defined
15107#define __ssize_t_defined
15108#define _IOFBF 0
15109#define _IOLBF 1
15110#define _IONBF 2
15111#define BUFSIZ 8192
15112#define EOF (-1)
15113#define SEEK_SET 0
15114#define SEEK_CUR 1
15115#define SEEK_END 2
15116#define SEEK_DATA 3
15117#define SEEK_HOLE 4
15118#define P_tmpdir "/tmp"
15119#define _BITS_STDIO_LIM_H 1
15120#define L_tmpnam 20
15121#define TMP_MAX 238328
15122#define FILENAME_MAX 4096
15123#define L_ctermid 9
15124#define L_cuserid 9
15125#undef FOPEN_MAX
15126#define FOPEN_MAX 16
15127#define stdin stdin
15128#define stdout stdout
15129#define stderr stderr
15130#define RENAME_NOREPLACE (1 << 0)
15131#define RENAME_EXCHANGE (1 << 1)
15132#define RENAME_WHITEOUT (1 << 2)
15133#define _BITS_FLOATN_H
15134#define __HAVE_FLOAT128 1
15135#define __HAVE_DISTINCT_FLOAT128 1
15136#define __HAVE_FLOAT64X 1
15137#define __HAVE_FLOAT64X_LONG_DOUBLE 1
15138#define __f128(x) x ##f128
15139#define __CFLOAT128 _Complex _Float128
15140#define _BITS_FLOATN_COMMON_H
15141#define __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI 0
15142#define __HAVE_FLOAT16 0
15143#define __HAVE_FLOAT32 1
15144#define __HAVE_FLOAT64 1
15145#define __HAVE_FLOAT32X 1
15146#define __HAVE_FLOAT128X 0
15147#define __HAVE_DISTINCT_FLOAT16 __HAVE_FLOAT16
15148#define __HAVE_DISTINCT_FLOAT32 0
15149#define __HAVE_DISTINCT_FLOAT64 0
15150#define __HAVE_DISTINCT_FLOAT32X 0
15151#define __HAVE_DISTINCT_FLOAT64X 0
15152#define __HAVE_DISTINCT_FLOAT128X __HAVE_FLOAT128X
15153#define __HAVE_FLOAT128_UNLIKE_LDBL (__HAVE_DISTINCT_FLOAT128 && __LDBL_MANT_DIG__ != 113)
15154#define __HAVE_FLOATN_NOT_TYPEDEF 1
15155#define __f32(x) x ##f32
15156#define __f64(x) x ##f64
15157#define __f32x(x) x ##f32x
15158#define __f64x(x) x ##f64x
15159#define __CFLOAT32 _Complex _Float32
15160#define __CFLOAT64 _Complex _Float64
15161#define __CFLOAT32X _Complex _Float32x
15162#define __CFLOAT64X _Complex _Float64x
15163#define _BITS_STDIO_H 1
15164#define __STDIO_INLINE __extern_inline
15165#define fread_unlocked(ptr,size,n,stream) (__extension__ ((__builtin_constant_p (size) && __builtin_constant_p (n) && (size_t) (size) * (size_t) (n) <= 8 && (size_t) (size) != 0) ? ({ char *__ptr = (char *) (ptr); FILE *__stream = (stream); size_t __cnt; for (__cnt = (size_t) (size) * (size_t) (n); __cnt > 0; --__cnt) { int __c = getc_unlocked (__stream); if (__c == EOF) break; *__ptr++ = __c; } ((size_t) (size) * (size_t) (n) - __cnt) / (size_t) (size); }) : (((__builtin_constant_p (size) && (size_t) (size) == 0) || (__builtin_constant_p (n) && (size_t) (n) == 0)) ? ((void) (ptr), (void) (stream), (void) (size), (void) (n), (size_t) 0) : fread_unlocked (ptr, size, n, stream))))
15166#define fwrite_unlocked(ptr,size,n,stream) (__extension__ ((__builtin_constant_p (size) && __builtin_constant_p (n) && (size_t) (size) * (size_t) (n) <= 8 && (size_t) (size) != 0) ? ({ const char *__ptr = (const char *) (ptr); FILE *__stream = (stream); size_t __cnt; for (__cnt = (size_t) (size) * (size_t) (n); __cnt > 0; --__cnt) if (putc_unlocked (*__ptr++, __stream) == EOF) break; ((size_t) (size) * (size_t) (n) - __cnt) / (size_t) (size); }) : (((__builtin_constant_p (size) && (size_t) (size) == 0) || (__builtin_constant_p (n) && (size_t) (n) == 0)) ? ((void) (ptr), (void) (stream), (void) (size), (void) (n), (size_t) 0) : fwrite_unlocked (ptr, size, n, stream))))
15167#undef __STDIO_INLINE
15168#define _BITS_STDIO2_H 1
15169#undef fread_unlocked
15170#define _SYS_TYPES_H 1
15171#define __u_char_defined
15172#define __ino_t_defined
15173#define __ino64_t_defined
15174#define __dev_t_defined
15175#define __gid_t_defined
15176#define __mode_t_defined
15177#define __nlink_t_defined
15178#define __uid_t_defined
15179#define __pid_t_defined
15180#define __id_t_defined
15181#define __daddr_t_defined
15182#define __key_t_defined
15183#define __clock_t_defined 1
15184#define __clockid_t_defined 1
15185#define __time_t_defined 1
15186#define __timer_t_defined 1
15187#define __useconds_t_defined
15188#define __suseconds_t_defined
15189#define __need_size_t
15190#undef __need_size_t
15191#undef __need_NULL
15192#define _BITS_STDINT_INTN_H 1
15193#define __BIT_TYPES_DEFINED__ 1
15194#define _ENDIAN_H 1
15195#define _BITS_ENDIAN_H 1
15196#define __LITTLE_ENDIAN 1234
15197#define __BIG_ENDIAN 4321
15198#define __PDP_ENDIAN 3412
15199#define _BITS_ENDIANNESS_H 1
15200#define __BYTE_ORDER __LITTLE_ENDIAN
15201#define __FLOAT_WORD_ORDER __BYTE_ORDER
15202#define __LONG_LONG_PAIR(HI,LO) LO, HI
15203#define LITTLE_ENDIAN __LITTLE_ENDIAN
15204#define BIG_ENDIAN __BIG_ENDIAN
15205#define PDP_ENDIAN __PDP_ENDIAN
15206#define BYTE_ORDER __BYTE_ORDER
15207#define _BITS_BYTESWAP_H 1
15208#define __bswap_constant_16(x) ((__uint16_t) ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8)))
15209#define __bswap_constant_32(x) ((((x) & 0xff000000u) >> 24) | (((x) & 0x00ff0000u) >> 8) | (((x) & 0x0000ff00u) << 8) | (((x) & 0x000000ffu) << 24))
15210#define __bswap_constant_64(x) ((((x) & 0xff00000000000000ull) >> 56) | (((x) & 0x00ff000000000000ull) >> 40) | (((x) & 0x0000ff0000000000ull) >> 24) | (((x) & 0x000000ff00000000ull) >> 8) | (((x) & 0x00000000ff000000ull) << 8) | (((x) & 0x0000000000ff0000ull) << 24) | (((x) & 0x000000000000ff00ull) << 40) | (((x) & 0x00000000000000ffull) << 56))
15211#define _BITS_UINTN_IDENTITY_H 1
15212#define htobe16(x) __bswap_16 (x)
15213#define htole16(x) __uint16_identity (x)
15214#define be16toh(x) __bswap_16 (x)
15215#define le16toh(x) __uint16_identity (x)
15216#define htobe32(x) __bswap_32 (x)
15217#define htole32(x) __uint32_identity (x)
15218#define be32toh(x) __bswap_32 (x)
15219#define le32toh(x) __uint32_identity (x)
15220#define htobe64(x) __bswap_64 (x)
15221#define htole64(x) __uint64_identity (x)
15222#define be64toh(x) __bswap_64 (x)
15223#define le64toh(x) __uint64_identity (x)
15224#define _SYS_SELECT_H 1
15225#define __FD_ZERO(s) do { unsigned int __i; fd_set *__arr = (s); for (__i = 0; __i < sizeof (fd_set) / sizeof (__fd_mask); ++__i) __FDS_BITS (__arr)[__i] = 0; } while (0)
15226#define __FD_SET(d,s) ((void) (__FDS_BITS (s)[__FD_ELT(d)] |= __FD_MASK(d)))
15227#define __FD_CLR(d,s) ((void) (__FDS_BITS (s)[__FD_ELT(d)] &= ~__FD_MASK(d)))
15228#define __FD_ISSET(d,s) ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
15229#define __sigset_t_defined 1
15230#define ____sigset_t_defined
15231#define _SIGSET_NWORDS (1024 / (8 * sizeof (unsigned long int)))
15232#define __timeval_defined 1
15233#define _STRUCT_TIMESPEC 1
15234#undef __NFDBITS
15235#define __NFDBITS (8 * (int) sizeof (__fd_mask))
15236#define __FD_ELT(d) ((d) / __NFDBITS)
15237#define __FD_MASK(d) ((__fd_mask) (1UL << ((d) % __NFDBITS)))
15238#define __FDS_BITS(set) ((set)->fds_bits)
15239#define FD_SETSIZE __FD_SETSIZE
15240#define NFDBITS __NFDBITS
15241#define FD_SET(fd,fdsetp) __FD_SET (fd, fdsetp)
15242#define FD_CLR(fd,fdsetp) __FD_CLR (fd, fdsetp)
15243#define FD_ISSET(fd,fdsetp) __FD_ISSET (fd, fdsetp)
15244#define FD_ZERO(fdsetp) __FD_ZERO (fdsetp)
15245#undef __FD_ELT
15246#define __FD_ELT(d) __extension__ ({ long int __d = (d); (__builtin_constant_p (__d) ? (0 <= __d && __d < __FD_SETSIZE ? (__d / __NFDBITS) : __fdelt_warn (__d)) : __fdelt_chk (__d)); })
15247#define __blksize_t_defined
15248#define __blkcnt_t_defined
15249#define __fsblkcnt_t_defined
15250#define __fsfilcnt_t_defined
15251#define _BITS_PTHREADTYPES_COMMON_H 1
15252#define _THREAD_SHARED_TYPES_H 1
15253#define _BITS_PTHREADTYPES_ARCH_H 1
15254#define __WORDSIZE 64
15255#define __WORDSIZE_TIME64_COMPAT32 1
15256#define __SYSCALL_WORDSIZE 64
15257#define __SIZEOF_PTHREAD_MUTEX_T 40
15258#define __SIZEOF_PTHREAD_ATTR_T 56
15259#define __SIZEOF_PTHREAD_RWLOCK_T 56
15260#define __SIZEOF_PTHREAD_BARRIER_T 32
15261#define __SIZEOF_PTHREAD_MUTEXATTR_T 4
15262#define __SIZEOF_PTHREAD_COND_T 48
15263#define __SIZEOF_PTHREAD_CONDATTR_T 4
15264#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
15265#define __SIZEOF_PTHREAD_BARRIERATTR_T 4
15266#define __LOCK_ALIGNMENT
15267#define __ONCE_ALIGNMENT
15268#define _THREAD_MUTEX_INTERNAL_H 1
15269#define __PTHREAD_MUTEX_HAVE_PREV 1
15270#define __PTHREAD_MUTEX_INITIALIZER(__kind) 0, 0, 0, 0, __kind, 0, 0, { 0, 0 }
15271#define _RWLOCK_INTERNAL_H
15272#define __PTHREAD_RWLOCK_ELISION_EXTRA 0, { 0, 0, 0, 0, 0, 0, 0 }
15273#define __PTHREAD_RWLOCK_INITIALIZER(__flags) 0, 0, 0, 0, 0, 0, 0, 0, __PTHREAD_RWLOCK_ELISION_EXTRA, 0, __flags
15274#define __ONCE_FLAG_INIT { 0 }
15275#define __have_pthread_attr_t 1
15276#define _SYS_STAT_H 1
15277#define _BITS_STAT_H 1
15278#define _STAT_VER_KERNEL 0
15279#define _STAT_VER_LINUX 1
15280#define _MKNOD_VER_LINUX 0
15281#define _STAT_VER _STAT_VER_LINUX
15282#define st_atime st_atim.tv_sec
15283#define st_mtime st_mtim.tv_sec
15284#define st_ctime st_ctim.tv_sec
15285#define _STATBUF_ST_BLKSIZE
15286#define _STATBUF_ST_RDEV
15287#define _STATBUF_ST_NSEC
15288#define __S_IFMT 0170000
15289#define __S_IFDIR 0040000
15290#define __S_IFCHR 0020000
15291#define __S_IFBLK 0060000
15292#define __S_IFREG 0100000
15293#define __S_IFIFO 0010000
15294#define __S_IFLNK 0120000
15295#define __S_IFSOCK 0140000
15296#define __S_TYPEISMQ(buf) ((buf)->st_mode - (buf)->st_mode)
15297#define __S_TYPEISSEM(buf) ((buf)->st_mode - (buf)->st_mode)
15298#define __S_TYPEISSHM(buf) ((buf)->st_mode - (buf)->st_mode)
15299#define __S_ISUID 04000
15300#define __S_ISGID 02000
15301#define __S_ISVTX 01000
15302#define __S_IREAD 0400
15303#define __S_IWRITE 0200
15304#define __S_IEXEC 0100
15305#define UTIME_NOW ((1l << 30) - 1l)
15306#define UTIME_OMIT ((1l << 30) - 2l)
15307#define S_IFMT __S_IFMT
15308#define S_IFDIR __S_IFDIR
15309#define S_IFCHR __S_IFCHR
15310#define S_IFBLK __S_IFBLK
15311#define S_IFREG __S_IFREG
15312#define S_IFIFO __S_IFIFO
15313#define S_IFLNK __S_IFLNK
15314#define S_IFSOCK __S_IFSOCK
15315#define __S_ISTYPE(mode,mask) (((mode) & __S_IFMT) == (mask))
15316#define S_ISDIR(mode) __S_ISTYPE((mode), __S_IFDIR)
15317#define S_ISCHR(mode) __S_ISTYPE((mode), __S_IFCHR)
15318#define S_ISBLK(mode) __S_ISTYPE((mode), __S_IFBLK)
15319#define S_ISREG(mode) __S_ISTYPE((mode), __S_IFREG)
15320#define S_ISFIFO(mode) __S_ISTYPE((mode), __S_IFIFO)
15321#define S_ISLNK(mode) __S_ISTYPE((mode), __S_IFLNK)
15322#define S_ISSOCK(mode) __S_ISTYPE((mode), __S_IFSOCK)
15323#define S_TYPEISMQ(buf) __S_TYPEISMQ(buf)
15324#define S_TYPEISSEM(buf) __S_TYPEISSEM(buf)
15325#define S_TYPEISSHM(buf) __S_TYPEISSHM(buf)
15326#define S_ISUID __S_ISUID
15327#define S_ISGID __S_ISGID
15328#define S_ISVTX __S_ISVTX
15329#define S_IRUSR __S_IREAD
15330#define S_IWUSR __S_IWRITE
15331#define S_IXUSR __S_IEXEC
15332#define S_IRWXU (__S_IREAD|__S_IWRITE|__S_IEXEC)
15333#define S_IREAD S_IRUSR
15334#define S_IWRITE S_IWUSR
15335#define S_IEXEC S_IXUSR
15336#define S_IRGRP (S_IRUSR >> 3)
15337#define S_IWGRP (S_IWUSR >> 3)
15338#define S_IXGRP (S_IXUSR >> 3)
15339#define S_IRWXG (S_IRWXU >> 3)
15340#define S_IROTH (S_IRGRP >> 3)
15341#define S_IWOTH (S_IWGRP >> 3)
15342#define S_IXOTH (S_IXGRP >> 3)
15343#define S_IRWXO (S_IRWXG >> 3)
15344#define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO)
15345#define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)
15346#define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)
15347#define S_BLKSIZE 512
15348#define _MKNOD_VER 0
15349#define _LINUX_STAT_H
15350#define _LINUX_TYPES_H
15351#define _ASM_GENERIC_TYPES_H
15352#define _ASM_GENERIC_INT_LL64_H
15353#define __ASM_X86_BITSPERLONG_H
15354#define __BITS_PER_LONG 64
15355#define __ASM_GENERIC_BITS_PER_LONG
15356#define _LINUX_POSIX_TYPES_H
15357#undef __FD_SETSIZE
15358#define __FD_SETSIZE 1024
15359#define _ASM_X86_POSIX_TYPES_64_H
15360#define __kernel_old_uid_t __kernel_old_uid_t
15361#define __kernel_old_dev_t __kernel_old_dev_t
15362#define __ASM_GENERIC_POSIX_TYPES_H
15363#define __bitwise__
15364#define __bitwise __bitwise__
15365#define __aligned_u64 __u64 __attribute__((aligned(8)))
15366#define __aligned_be64 __be64 __attribute__((aligned(8)))
15367#define __aligned_le64 __le64 __attribute__((aligned(8)))
15368#define STATX_TYPE 0x00000001U
15369#define STATX_MODE 0x00000002U
15370#define STATX_NLINK 0x00000004U
15371#define STATX_UID 0x00000008U
15372#define STATX_GID 0x00000010U
15373#define STATX_ATIME 0x00000020U
15374#define STATX_MTIME 0x00000040U
15375#define STATX_CTIME 0x00000080U
15376#define STATX_INO 0x00000100U
15377#define STATX_SIZE 0x00000200U
15378#define STATX_BLOCKS 0x00000400U
15379#define STATX_BASIC_STATS 0x000007ffU
15380#define STATX_BTIME 0x00000800U
15381#define STATX_MNT_ID 0x00001000U
15382#define STATX__RESERVED 0x80000000U
15383#define STATX_ALL 0x00000fffU
15384#define STATX_ATTR_COMPRESSED 0x00000004
15385#define STATX_ATTR_IMMUTABLE 0x00000010
15386#define STATX_ATTR_APPEND 0x00000020
15387#define STATX_ATTR_NODUMP 0x00000040
15388#define STATX_ATTR_ENCRYPTED 0x00000800
15389#define STATX_ATTR_AUTOMOUNT 0x00001000
15390#define STATX_ATTR_MOUNT_ROOT 0x00002000
15391#define STATX_ATTR_VERITY 0x00100000
15392#define STATX_ATTR_DAX 0x00002000
15393#define __statx_timestamp_defined 1
15394#define __statx_defined 1
15395#define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
15396#undef __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
15397#undef __GLIBC_USE_LIB_EXT2
15398#define __GLIBC_USE_LIB_EXT2 1
15399#undef __GLIBC_USE_IEC_60559_BFP_EXT
15400#define __GLIBC_USE_IEC_60559_BFP_EXT 1
15401#undef __GLIBC_USE_IEC_60559_BFP_EXT_C2X
15402#define __GLIBC_USE_IEC_60559_BFP_EXT_C2X 1
15403#undef __GLIBC_USE_IEC_60559_FUNCS_EXT
15404#define __GLIBC_USE_IEC_60559_FUNCS_EXT 1
15405#undef __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X
15406#define __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X 1
15407#undef __GLIBC_USE_IEC_60559_TYPES_EXT
15408#define __GLIBC_USE_IEC_60559_TYPES_EXT 1
15409#define __need_size_t
15410#define __need_wchar_t
15411#define __need_NULL
15412#undef __need_size_t
15413#define __wchar_t__
15414#define __WCHAR_T__
15415#define _WCHAR_T
15416#define _T_WCHAR_
15417#define _T_WCHAR
15418#define __WCHAR_T
15419#define _WCHAR_T_
15420#define _BSD_WCHAR_T_
15421#define _WCHAR_T_DEFINED_
15422#define _WCHAR_T_DEFINED
15423#define _WCHAR_T_H
15424#define ___int_wchar_t_h
15425#define __INT_WCHAR_T_H
15426#define _GCC_WCHAR_T
15427#define _WCHAR_T_DECLARED
15428#undef _BSD_WCHAR_T_
15429#undef __need_wchar_t
15430#undef NULL
15431#define NULL ((void *)0)
15432#undef __need_NULL
15433#define _STDLIB_H 1
15434#define WNOHANG 1
15435#define WUNTRACED 2
15436#define WSTOPPED 2
15437#define WEXITED 4
15438#define WCONTINUED 8
15439#define WNOWAIT 0x01000000
15440#define __WNOTHREAD 0x20000000
15441#define __WALL 0x40000000
15442#define __WCLONE 0x80000000
15443#define __WEXITSTATUS(status) (((status) & 0xff00) >> 8)
15444#define __WTERMSIG(status) ((status) & 0x7f)
15445#define __WSTOPSIG(status) __WEXITSTATUS(status)
15446#define __WIFEXITED(status) (__WTERMSIG(status) == 0)
15447#define __WIFSIGNALED(status) (((signed char) (((status) & 0x7f) + 1) >> 1) > 0)
15448#define __WIFSTOPPED(status) (((status) & 0xff) == 0x7f)
15449#define __WIFCONTINUED(status) ((status) == __W_CONTINUED)
15450#define __WCOREDUMP(status) ((status) & __WCOREFLAG)
15451#define __W_EXITCODE(ret,sig) ((ret) << 8 | (sig))
15452#define __W_STOPCODE(sig) ((sig) << 8 | 0x7f)
15453#define __W_CONTINUED 0xffff
15454#define __WCOREFLAG 0x80
15455#define WEXITSTATUS(status) __WEXITSTATUS (status)
15456#define WTERMSIG(status) __WTERMSIG (status)
15457#define WSTOPSIG(status) __WSTOPSIG (status)
15458#define WIFEXITED(status) __WIFEXITED (status)
15459#define WIFSIGNALED(status) __WIFSIGNALED (status)
15460#define WIFSTOPPED(status) __WIFSTOPPED (status)
15461#define WIFCONTINUED(status) __WIFCONTINUED (status)
15462#define __ldiv_t_defined 1
15463#define __lldiv_t_defined 1
15464#define RAND_MAX 2147483647
15465#define EXIT_FAILURE 1
15466#define EXIT_SUCCESS 0
15467#define MB_CUR_MAX (__ctype_get_mb_cur_max ())
15468#define _BITS_TYPES_LOCALE_T_H 1
15469#define _BITS_TYPES___LOCALE_T_H 1
15470#define _ALLOCA_H 1
15471#define __need_size_t
15472#undef __need_size_t
15473#undef __need_NULL
15474#undef alloca
15475#define alloca(size) __builtin_alloca (size)
15476#define __COMPAR_FN_T
15477#define __STDLIB_MB_LEN_MAX 16
15478#define _STDDEF_H
15479#define _STDDEF_H_
15480#define _ANSI_STDDEF_H
15481#define _PTRDIFF_T
15482#define _T_PTRDIFF_
15483#define _T_PTRDIFF
15484#define __PTRDIFF_T
15485#define _PTRDIFF_T_
15486#define _BSD_PTRDIFF_T_
15487#define ___int_ptrdiff_t_h
15488#define _GCC_PTRDIFF_T
15489#define _PTRDIFF_T_DECLARED
15490#undef __need_ptrdiff_t
15491#undef __need_size_t
15492#undef __need_wchar_t
15493#undef NULL
15494#define NULL ((void *)0)
15495#undef __need_NULL
15496#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER)
15497#define _STRING_H 1
15498#define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
15499#undef __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
15500#undef __GLIBC_USE_LIB_EXT2
15501#define __GLIBC_USE_LIB_EXT2 1
15502#undef __GLIBC_USE_IEC_60559_BFP_EXT
15503#define __GLIBC_USE_IEC_60559_BFP_EXT 1
15504#undef __GLIBC_USE_IEC_60559_BFP_EXT_C2X
15505#define __GLIBC_USE_IEC_60559_BFP_EXT_C2X 1
15506#undef __GLIBC_USE_IEC_60559_FUNCS_EXT
15507#define __GLIBC_USE_IEC_60559_FUNCS_EXT 1
15508#undef __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X
15509#define __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X 1
15510#undef __GLIBC_USE_IEC_60559_TYPES_EXT
15511#define __GLIBC_USE_IEC_60559_TYPES_EXT 1
15512#define __need_size_t
15513#define __need_NULL
15514#undef __need_ptrdiff_t
15515#undef __need_size_t
15516#undef __need_wchar_t
15517#undef NULL
15518#define NULL ((void *)0)
15519#undef __need_NULL
15520#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER)
15521#define strdupa(s) (__extension__ ({ const char *__old = (s); size_t __len = strlen (__old) + 1; char *__new = (char *) __builtin_alloca (__len); (char *) memcpy (__new, __old, __len); }))
15522#define strndupa(s,n) (__extension__ ({ const char *__old = (s); size_t __len = strnlen (__old, (n)); char *__new = (char *) __builtin_alloca (__len + 1); __new[__len] = '\0'; (char *) memcpy (__new, __old, __len); }))
15523#define _STRINGS_H 1
15524#define __need_size_t
15525#undef __need_ptrdiff_t
15526#undef __need_size_t
15527#undef __need_wchar_t
15528#undef NULL
15529#define NULL ((void *)0)
15530#undef __need_NULL
15531#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER)
15532#define __STRINGS_FORTIFIED 1
15533#define _BITS_STRING_FORTIFIED_H 1
15534#define _INTTYPES_H 1
15535#define _STDINT_H 1
15536#define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
15537#undef __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
15538#undef __GLIBC_USE_LIB_EXT2
15539#define __GLIBC_USE_LIB_EXT2 1
15540#undef __GLIBC_USE_IEC_60559_BFP_EXT
15541#define __GLIBC_USE_IEC_60559_BFP_EXT 1
15542#undef __GLIBC_USE_IEC_60559_BFP_EXT_C2X
15543#define __GLIBC_USE_IEC_60559_BFP_EXT_C2X 1
15544#undef __GLIBC_USE_IEC_60559_FUNCS_EXT
15545#define __GLIBC_USE_IEC_60559_FUNCS_EXT 1
15546#undef __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X
15547#define __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X 1
15548#undef __GLIBC_USE_IEC_60559_TYPES_EXT
15549#define __GLIBC_USE_IEC_60559_TYPES_EXT 1
15550#define _BITS_WCHAR_H 1
15551#define __WCHAR_MAX __WCHAR_MAX__
15552#define __WCHAR_MIN __WCHAR_MIN__
15553#define __WORDSIZE 64
15554#define __WORDSIZE_TIME64_COMPAT32 1
15555#define __SYSCALL_WORDSIZE 64
15556#define _BITS_STDINT_UINTN_H 1
15557#define __intptr_t_defined
15558#define __INT64_C(c) c ## L
15559#define __UINT64_C(c) c ## UL
15560#define INT8_MIN (-128)
15561#define INT16_MIN (-32767-1)
15562#define INT32_MIN (-2147483647-1)
15563#define INT64_MIN (-__INT64_C(9223372036854775807)-1)
15564#define INT8_MAX (127)
15565#define INT16_MAX (32767)
15566#define INT32_MAX (2147483647)
15567#define INT64_MAX (__INT64_C(9223372036854775807))
15568#define UINT8_MAX (255)
15569#define UINT16_MAX (65535)
15570#define UINT32_MAX (4294967295U)
15571#define UINT64_MAX (__UINT64_C(18446744073709551615))
15572#define INT_LEAST8_MIN (-128)
15573#define INT_LEAST16_MIN (-32767-1)
15574#define INT_LEAST32_MIN (-2147483647-1)
15575#define INT_LEAST64_MIN (-__INT64_C(9223372036854775807)-1)
15576#define INT_LEAST8_MAX (127)
15577#define INT_LEAST16_MAX (32767)
15578#define INT_LEAST32_MAX (2147483647)
15579#define INT_LEAST64_MAX (__INT64_C(9223372036854775807))
15580#define UINT_LEAST8_MAX (255)
15581#define UINT_LEAST16_MAX (65535)
15582#define UINT_LEAST32_MAX (4294967295U)
15583#define UINT_LEAST64_MAX (__UINT64_C(18446744073709551615))
15584#define INT_FAST8_MIN (-128)
15585#define INT_FAST16_MIN (-9223372036854775807L-1)
15586#define INT_FAST32_MIN (-9223372036854775807L-1)
15587#define INT_FAST64_MIN (-__INT64_C(9223372036854775807)-1)
15588#define INT_FAST8_MAX (127)
15589#define INT_FAST16_MAX (9223372036854775807L)
15590#define INT_FAST32_MAX (9223372036854775807L)
15591#define INT_FAST64_MAX (__INT64_C(9223372036854775807))
15592#define UINT_FAST8_MAX (255)
15593#define UINT_FAST16_MAX (18446744073709551615UL)
15594#define UINT_FAST32_MAX (18446744073709551615UL)
15595#define UINT_FAST64_MAX (__UINT64_C(18446744073709551615))
15596#define INTPTR_MIN (-9223372036854775807L-1)
15597#define INTPTR_MAX (9223372036854775807L)
15598#define UINTPTR_MAX (18446744073709551615UL)
15599#define INTMAX_MIN (-__INT64_C(9223372036854775807)-1)
15600#define INTMAX_MAX (__INT64_C(9223372036854775807))
15601#define UINTMAX_MAX (__UINT64_C(18446744073709551615))
15602#define PTRDIFF_MIN (-9223372036854775807L-1)
15603#define PTRDIFF_MAX (9223372036854775807L)
15604#define SIG_ATOMIC_MIN (-2147483647-1)
15605#define SIG_ATOMIC_MAX (2147483647)
15606#define SIZE_MAX (18446744073709551615UL)
15607#define WCHAR_MIN __WCHAR_MIN
15608#define WCHAR_MAX __WCHAR_MAX
15609#define WINT_MIN (0u)
15610#define WINT_MAX (4294967295u)
15611#define INT8_C(c) c
15612#define INT16_C(c) c
15613#define INT32_C(c) c
15614#define INT64_C(c) c ## L
15615#define UINT8_C(c) c
15616#define UINT16_C(c) c
15617#define UINT32_C(c) c ## U
15618#define UINT64_C(c) c ## UL
15619#define INTMAX_C(c) c ## L
15620#define UINTMAX_C(c) c ## UL
15621#define INT8_WIDTH 8
15622#define UINT8_WIDTH 8
15623#define INT16_WIDTH 16
15624#define UINT16_WIDTH 16
15625#define INT32_WIDTH 32
15626#define UINT32_WIDTH 32
15627#define INT64_WIDTH 64
15628#define UINT64_WIDTH 64
15629#define INT_LEAST8_WIDTH 8
15630#define UINT_LEAST8_WIDTH 8
15631#define INT_LEAST16_WIDTH 16
15632#define UINT_LEAST16_WIDTH 16
15633#define INT_LEAST32_WIDTH 32
15634#define UINT_LEAST32_WIDTH 32
15635#define INT_LEAST64_WIDTH 64
15636#define UINT_LEAST64_WIDTH 64
15637#define INT_FAST8_WIDTH 8
15638#define UINT_FAST8_WIDTH 8
15639#define INT_FAST16_WIDTH __WORDSIZE
15640#define UINT_FAST16_WIDTH __WORDSIZE
15641#define INT_FAST32_WIDTH __WORDSIZE
15642#define UINT_FAST32_WIDTH __WORDSIZE
15643#define INT_FAST64_WIDTH 64
15644#define UINT_FAST64_WIDTH 64
15645#define INTPTR_WIDTH __WORDSIZE
15646#define UINTPTR_WIDTH __WORDSIZE
15647#define INTMAX_WIDTH 64
15648#define UINTMAX_WIDTH 64
15649#define PTRDIFF_WIDTH __WORDSIZE
15650#define SIG_ATOMIC_WIDTH 32
15651#define SIZE_WIDTH __WORDSIZE
15652#define WCHAR_WIDTH 32
15653#define WINT_WIDTH 32
15654#define _GCC_WRAP_STDINT_H
15655#define ____gwchar_t_defined 1
15656#define __PRI64_PREFIX "l"
15657#define __PRIPTR_PREFIX "l"
15658#define PRId8 "d"
15659#define PRId16 "d"
15660#define PRId32 "d"
15661#define PRId64 __PRI64_PREFIX "d"
15662#define PRIdLEAST8 "d"
15663#define PRIdLEAST16 "d"
15664#define PRIdLEAST32 "d"
15665#define PRIdLEAST64 __PRI64_PREFIX "d"
15666#define PRIdFAST8 "d"
15667#define PRIdFAST16 __PRIPTR_PREFIX "d"
15668#define PRIdFAST32 __PRIPTR_PREFIX "d"
15669#define PRIdFAST64 __PRI64_PREFIX "d"
15670#define PRIi8 "i"
15671#define PRIi16 "i"
15672#define PRIi32 "i"
15673#define PRIi64 __PRI64_PREFIX "i"
15674#define PRIiLEAST8 "i"
15675#define PRIiLEAST16 "i"
15676#define PRIiLEAST32 "i"
15677#define PRIiLEAST64 __PRI64_PREFIX "i"
15678#define PRIiFAST8 "i"
15679#define PRIiFAST16 __PRIPTR_PREFIX "i"
15680#define PRIiFAST32 __PRIPTR_PREFIX "i"
15681#define PRIiFAST64 __PRI64_PREFIX "i"
15682#define PRIo8 "o"
15683#define PRIo16 "o"
15684#define PRIo32 "o"
15685#define PRIo64 __PRI64_PREFIX "o"
15686#define PRIoLEAST8 "o"
15687#define PRIoLEAST16 "o"
15688#define PRIoLEAST32 "o"
15689#define PRIoLEAST64 __PRI64_PREFIX "o"
15690#define PRIoFAST8 "o"
15691#define PRIoFAST16 __PRIPTR_PREFIX "o"
15692#define PRIoFAST32 __PRIPTR_PREFIX "o"
15693#define PRIoFAST64 __PRI64_PREFIX "o"
15694#define PRIu8 "u"
15695#define PRIu16 "u"
15696#define PRIu32 "u"
15697#define PRIu64 __PRI64_PREFIX "u"
15698#define PRIuLEAST8 "u"
15699#define PRIuLEAST16 "u"
15700#define PRIuLEAST32 "u"
15701#define PRIuLEAST64 __PRI64_PREFIX "u"
15702#define PRIuFAST8 "u"
15703#define PRIuFAST16 __PRIPTR_PREFIX "u"
15704#define PRIuFAST32 __PRIPTR_PREFIX "u"
15705#define PRIuFAST64 __PRI64_PREFIX "u"
15706#define PRIx8 "x"
15707#define PRIx16 "x"
15708#define PRIx32 "x"
15709#define PRIx64 __PRI64_PREFIX "x"
15710#define PRIxLEAST8 "x"
15711#define PRIxLEAST16 "x"
15712#define PRIxLEAST32 "x"
15713#define PRIxLEAST64 __PRI64_PREFIX "x"
15714#define PRIxFAST8 "x"
15715#define PRIxFAST16 __PRIPTR_PREFIX "x"
15716#define PRIxFAST32 __PRIPTR_PREFIX "x"
15717#define PRIxFAST64 __PRI64_PREFIX "x"
15718#define PRIX8 "X"
15719#define PRIX16 "X"
15720#define PRIX32 "X"
15721#define PRIX64 __PRI64_PREFIX "X"
15722#define PRIXLEAST8 "X"
15723#define PRIXLEAST16 "X"
15724#define PRIXLEAST32 "X"
15725#define PRIXLEAST64 __PRI64_PREFIX "X"
15726#define PRIXFAST8 "X"
15727#define PRIXFAST16 __PRIPTR_PREFIX "X"
15728#define PRIXFAST32 __PRIPTR_PREFIX "X"
15729#define PRIXFAST64 __PRI64_PREFIX "X"
15730#define PRIdMAX __PRI64_PREFIX "d"
15731#define PRIiMAX __PRI64_PREFIX "i"
15732#define PRIoMAX __PRI64_PREFIX "o"
15733#define PRIuMAX __PRI64_PREFIX "u"
15734#define PRIxMAX __PRI64_PREFIX "x"
15735#define PRIXMAX __PRI64_PREFIX "X"
15736#define PRIdPTR __PRIPTR_PREFIX "d"
15737#define PRIiPTR __PRIPTR_PREFIX "i"
15738#define PRIoPTR __PRIPTR_PREFIX "o"
15739#define PRIuPTR __PRIPTR_PREFIX "u"
15740#define PRIxPTR __PRIPTR_PREFIX "x"
15741#define PRIXPTR __PRIPTR_PREFIX "X"
15742#define SCNd8 "hhd"
15743#define SCNd16 "hd"
15744#define SCNd32 "d"
15745#define SCNd64 __PRI64_PREFIX "d"
15746#define SCNdLEAST8 "hhd"
15747#define SCNdLEAST16 "hd"
15748#define SCNdLEAST32 "d"
15749#define SCNdLEAST64 __PRI64_PREFIX "d"
15750#define SCNdFAST8 "hhd"
15751#define SCNdFAST16 __PRIPTR_PREFIX "d"
15752#define SCNdFAST32 __PRIPTR_PREFIX "d"
15753#define SCNdFAST64 __PRI64_PREFIX "d"
15754#define SCNi8 "hhi"
15755#define SCNi16 "hi"
15756#define SCNi32 "i"
15757#define SCNi64 __PRI64_PREFIX "i"
15758#define SCNiLEAST8 "hhi"
15759#define SCNiLEAST16 "hi"
15760#define SCNiLEAST32 "i"
15761#define SCNiLEAST64 __PRI64_PREFIX "i"
15762#define SCNiFAST8 "hhi"
15763#define SCNiFAST16 __PRIPTR_PREFIX "i"
15764#define SCNiFAST32 __PRIPTR_PREFIX "i"
15765#define SCNiFAST64 __PRI64_PREFIX "i"
15766#define SCNu8 "hhu"
15767#define SCNu16 "hu"
15768#define SCNu32 "u"
15769#define SCNu64 __PRI64_PREFIX "u"
15770#define SCNuLEAST8 "hhu"
15771#define SCNuLEAST16 "hu"
15772#define SCNuLEAST32 "u"
15773#define SCNuLEAST64 __PRI64_PREFIX "u"
15774#define SCNuFAST8 "hhu"
15775#define SCNuFAST16 __PRIPTR_PREFIX "u"
15776#define SCNuFAST32 __PRIPTR_PREFIX "u"
15777#define SCNuFAST64 __PRI64_PREFIX "u"
15778#define SCNo8 "hho"
15779#define SCNo16 "ho"
15780#define SCNo32 "o"
15781#define SCNo64 __PRI64_PREFIX "o"
15782#define SCNoLEAST8 "hho"
15783#define SCNoLEAST16 "ho"
15784#define SCNoLEAST32 "o"
15785#define SCNoLEAST64 __PRI64_PREFIX "o"
15786#define SCNoFAST8 "hho"
15787#define SCNoFAST16 __PRIPTR_PREFIX "o"
15788#define SCNoFAST32 __PRIPTR_PREFIX "o"
15789#define SCNoFAST64 __PRI64_PREFIX "o"
15790#define SCNx8 "hhx"
15791#define SCNx16 "hx"
15792#define SCNx32 "x"
15793#define SCNx64 __PRI64_PREFIX "x"
15794#define SCNxLEAST8 "hhx"
15795#define SCNxLEAST16 "hx"
15796#define SCNxLEAST32 "x"
15797#define SCNxLEAST64 __PRI64_PREFIX "x"
15798#define SCNxFAST8 "hhx"
15799#define SCNxFAST16 __PRIPTR_PREFIX "x"
15800#define SCNxFAST32 __PRIPTR_PREFIX "x"
15801#define SCNxFAST64 __PRI64_PREFIX "x"
15802#define SCNdMAX __PRI64_PREFIX "d"
15803#define SCNiMAX __PRI64_PREFIX "i"
15804#define SCNoMAX __PRI64_PREFIX "o"
15805#define SCNuMAX __PRI64_PREFIX "u"
15806#define SCNxMAX __PRI64_PREFIX "x"
15807#define SCNdPTR __PRIPTR_PREFIX "d"
15808#define SCNiPTR __PRIPTR_PREFIX "i"
15809#define SCNoPTR __PRIPTR_PREFIX "o"
15810#define SCNuPTR __PRIPTR_PREFIX "u"
15811#define SCNxPTR __PRIPTR_PREFIX "x"
15812#define _STDALIGN_H
15813#define alignas _Alignas
15814#define alignof _Alignof
15815#define __alignas_is_defined 1
15816#define __alignof_is_defined 1
15817#define _UNISTD_H 1
15818#define _POSIX_VERSION 200809L
15819#define __POSIX2_THIS_VERSION 200809L
15820#define _POSIX2_VERSION __POSIX2_THIS_VERSION
15821#define _POSIX2_C_VERSION __POSIX2_THIS_VERSION
15822#define _POSIX2_C_BIND __POSIX2_THIS_VERSION
15823#define _POSIX2_C_DEV __POSIX2_THIS_VERSION
15824#define _POSIX2_SW_DEV __POSIX2_THIS_VERSION
15825#define _POSIX2_LOCALEDEF __POSIX2_THIS_VERSION
15826#define _XOPEN_VERSION 700
15827#define _XOPEN_XCU_VERSION 4
15828#define _XOPEN_XPG2 1
15829#define _XOPEN_XPG3 1
15830#define _XOPEN_XPG4 1
15831#define _XOPEN_UNIX 1
15832#define _XOPEN_ENH_I18N 1
15833#define _XOPEN_LEGACY 1
15834#define _BITS_POSIX_OPT_H 1
15835#define _POSIX_JOB_CONTROL 1
15836#define _POSIX_SAVED_IDS 1
15837#define _POSIX_PRIORITY_SCHEDULING 200809L
15838#define _POSIX_SYNCHRONIZED_IO 200809L
15839#define _POSIX_FSYNC 200809L
15840#define _POSIX_MAPPED_FILES 200809L
15841#define _POSIX_MEMLOCK 200809L
15842#define _POSIX_MEMLOCK_RANGE 200809L
15843#define _POSIX_MEMORY_PROTECTION 200809L
15844#define _POSIX_CHOWN_RESTRICTED 0
15845#define _POSIX_VDISABLE '\0'
15846#define _POSIX_NO_TRUNC 1
15847#define _XOPEN_REALTIME 1
15848#define _XOPEN_REALTIME_THREADS 1
15849#define _XOPEN_SHM 1
15850#define _POSIX_THREADS 200809L
15851#define _POSIX_REENTRANT_FUNCTIONS 1
15852#define _POSIX_THREAD_SAFE_FUNCTIONS 200809L
15853#define _POSIX_THREAD_PRIORITY_SCHEDULING 200809L
15854#define _POSIX_THREAD_ATTR_STACKSIZE 200809L
15855#define _POSIX_THREAD_ATTR_STACKADDR 200809L
15856#define _POSIX_THREAD_PRIO_INHERIT 200809L
15857#define _POSIX_THREAD_PRIO_PROTECT 200809L
15858#define _POSIX_THREAD_ROBUST_PRIO_INHERIT 200809L
15859#define _POSIX_THREAD_ROBUST_PRIO_PROTECT -1
15860#define _POSIX_SEMAPHORES 200809L
15861#define _POSIX_REALTIME_SIGNALS 200809L
15862#define _POSIX_ASYNCHRONOUS_IO 200809L
15863#define _POSIX_ASYNC_IO 1
15864#define _LFS_ASYNCHRONOUS_IO 1
15865#define _POSIX_PRIORITIZED_IO 200809L
15866#define _LFS64_ASYNCHRONOUS_IO 1
15867#define _LFS_LARGEFILE 1
15868#define _LFS64_LARGEFILE 1
15869#define _LFS64_STDIO 1
15870#define _POSIX_SHARED_MEMORY_OBJECTS 200809L
15871#define _POSIX_CPUTIME 0
15872#define _POSIX_THREAD_CPUTIME 0
15873#define _POSIX_REGEXP 1
15874#define _POSIX_READER_WRITER_LOCKS 200809L
15875#define _POSIX_SHELL 1
15876#define _POSIX_TIMEOUTS 200809L
15877#define _POSIX_SPIN_LOCKS 200809L
15878#define _POSIX_SPAWN 200809L
15879#define _POSIX_TIMERS 200809L
15880#define _POSIX_BARRIERS 200809L
15881#define _POSIX_MESSAGE_PASSING 200809L
15882#define _POSIX_THREAD_PROCESS_SHARED 200809L
15883#define _POSIX_MONOTONIC_CLOCK 0
15884#define _POSIX_CLOCK_SELECTION 200809L
15885#define _POSIX_ADVISORY_INFO 200809L
15886#define _POSIX_IPV6 200809L
15887#define _POSIX_RAW_SOCKETS 200809L
15888#define _POSIX2_CHAR_TERM 200809L
15889#define _POSIX_SPORADIC_SERVER -1
15890#define _POSIX_THREAD_SPORADIC_SERVER -1
15891#define _POSIX_TRACE -1
15892#define _POSIX_TRACE_EVENT_FILTER -1
15893#define _POSIX_TRACE_INHERIT -1
15894#define _POSIX_TRACE_LOG -1
15895#define _POSIX_TYPED_MEMORY_OBJECTS -1
15896#define __WORDSIZE 64
15897#define __WORDSIZE_TIME64_COMPAT32 1
15898#define __SYSCALL_WORDSIZE 64
15899#define _POSIX_V7_LPBIG_OFFBIG -1
15900#define _POSIX_V6_LPBIG_OFFBIG -1
15901#define _XBS5_LPBIG_OFFBIG -1
15902#define _POSIX_V7_LP64_OFF64 1
15903#define _POSIX_V6_LP64_OFF64 1
15904#define _XBS5_LP64_OFF64 1
15905#define __ILP32_OFF32_CFLAGS "-m32"
15906#define __ILP32_OFF32_LDFLAGS "-m32"
15907#define __ILP32_OFFBIG_CFLAGS "-m32 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
15908#define __ILP32_OFFBIG_LDFLAGS "-m32"
15909#define __LP64_OFF64_CFLAGS "-m64"
15910#define __LP64_OFF64_LDFLAGS "-m64"
15911#define STDIN_FILENO 0
15912#define STDOUT_FILENO 1
15913#define STDERR_FILENO 2
15914#define __need_size_t
15915#define __need_NULL
15916#undef __need_ptrdiff_t
15917#undef __need_size_t
15918#undef __need_wchar_t
15919#undef NULL
15920#define NULL ((void *)0)
15921#undef __need_NULL
15922#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER)
15923#define __socklen_t_defined
15924#define R_OK 4
15925#define W_OK 2
15926#define X_OK 1
15927#define F_OK 0
15928#define L_SET SEEK_SET
15929#define L_INCR SEEK_CUR
15930#define L_XTND SEEK_END
15931#define _PC_LINK_MAX _PC_LINK_MAX
15932#define _PC_MAX_CANON _PC_MAX_CANON
15933#define _PC_MAX_INPUT _PC_MAX_INPUT
15934#define _PC_NAME_MAX _PC_NAME_MAX
15935#define _PC_PATH_MAX _PC_PATH_MAX
15936#define _PC_PIPE_BUF _PC_PIPE_BUF
15937#define _PC_CHOWN_RESTRICTED _PC_CHOWN_RESTRICTED
15938#define _PC_NO_TRUNC _PC_NO_TRUNC
15939#define _PC_VDISABLE _PC_VDISABLE
15940#define _PC_SYNC_IO _PC_SYNC_IO
15941#define _PC_ASYNC_IO _PC_ASYNC_IO
15942#define _PC_PRIO_IO _PC_PRIO_IO
15943#define _PC_SOCK_MAXBUF _PC_SOCK_MAXBUF
15944#define _PC_FILESIZEBITS _PC_FILESIZEBITS
15945#define _PC_REC_INCR_XFER_SIZE _PC_REC_INCR_XFER_SIZE
15946#define _PC_REC_MAX_XFER_SIZE _PC_REC_MAX_XFER_SIZE
15947#define _PC_REC_MIN_XFER_SIZE _PC_REC_MIN_XFER_SIZE
15948#define _PC_REC_XFER_ALIGN _PC_REC_XFER_ALIGN
15949#define _PC_ALLOC_SIZE_MIN _PC_ALLOC_SIZE_MIN
15950#define _PC_SYMLINK_MAX _PC_SYMLINK_MAX
15951#define _PC_2_SYMLINKS _PC_2_SYMLINKS
15952#define _SC_ARG_MAX _SC_ARG_MAX
15953#define _SC_CHILD_MAX _SC_CHILD_MAX
15954#define _SC_CLK_TCK _SC_CLK_TCK
15955#define _SC_NGROUPS_MAX _SC_NGROUPS_MAX
15956#define _SC_OPEN_MAX _SC_OPEN_MAX
15957#define _SC_STREAM_MAX _SC_STREAM_MAX
15958#define _SC_TZNAME_MAX _SC_TZNAME_MAX
15959#define _SC_JOB_CONTROL _SC_JOB_CONTROL
15960#define _SC_SAVED_IDS _SC_SAVED_IDS
15961#define _SC_REALTIME_SIGNALS _SC_REALTIME_SIGNALS
15962#define _SC_PRIORITY_SCHEDULING _SC_PRIORITY_SCHEDULING
15963#define _SC_TIMERS _SC_TIMERS
15964#define _SC_ASYNCHRONOUS_IO _SC_ASYNCHRONOUS_IO
15965#define _SC_PRIORITIZED_IO _SC_PRIORITIZED_IO
15966#define _SC_SYNCHRONIZED_IO _SC_SYNCHRONIZED_IO
15967#define _SC_FSYNC _SC_FSYNC
15968#define _SC_MAPPED_FILES _SC_MAPPED_FILES
15969#define _SC_MEMLOCK _SC_MEMLOCK
15970#define _SC_MEMLOCK_RANGE _SC_MEMLOCK_RANGE
15971#define _SC_MEMORY_PROTECTION _SC_MEMORY_PROTECTION
15972#define _SC_MESSAGE_PASSING _SC_MESSAGE_PASSING
15973#define _SC_SEMAPHORES _SC_SEMAPHORES
15974#define _SC_SHARED_MEMORY_OBJECTS _SC_SHARED_MEMORY_OBJECTS
15975#define _SC_AIO_LISTIO_MAX _SC_AIO_LISTIO_MAX
15976#define _SC_AIO_MAX _SC_AIO_MAX
15977#define _SC_AIO_PRIO_DELTA_MAX _SC_AIO_PRIO_DELTA_MAX
15978#define _SC_DELAYTIMER_MAX _SC_DELAYTIMER_MAX
15979#define _SC_MQ_OPEN_MAX _SC_MQ_OPEN_MAX
15980#define _SC_MQ_PRIO_MAX _SC_MQ_PRIO_MAX
15981#define _SC_VERSION _SC_VERSION
15982#define _SC_PAGESIZE _SC_PAGESIZE
15983#define _SC_PAGE_SIZE _SC_PAGESIZE
15984#define _SC_RTSIG_MAX _SC_RTSIG_MAX
15985#define _SC_SEM_NSEMS_MAX _SC_SEM_NSEMS_MAX
15986#define _SC_SEM_VALUE_MAX _SC_SEM_VALUE_MAX
15987#define _SC_SIGQUEUE_MAX _SC_SIGQUEUE_MAX
15988#define _SC_TIMER_MAX _SC_TIMER_MAX
15989#define _SC_BC_BASE_MAX _SC_BC_BASE_MAX
15990#define _SC_BC_DIM_MAX _SC_BC_DIM_MAX
15991#define _SC_BC_SCALE_MAX _SC_BC_SCALE_MAX
15992#define _SC_BC_STRING_MAX _SC_BC_STRING_MAX
15993#define _SC_COLL_WEIGHTS_MAX _SC_COLL_WEIGHTS_MAX
15994#define _SC_EQUIV_CLASS_MAX _SC_EQUIV_CLASS_MAX
15995#define _SC_EXPR_NEST_MAX _SC_EXPR_NEST_MAX
15996#define _SC_LINE_MAX _SC_LINE_MAX
15997#define _SC_RE_DUP_MAX _SC_RE_DUP_MAX
15998#define _SC_CHARCLASS_NAME_MAX _SC_CHARCLASS_NAME_MAX
15999#define _SC_2_VERSION _SC_2_VERSION
16000#define _SC_2_C_BIND _SC_2_C_BIND
16001#define _SC_2_C_DEV _SC_2_C_DEV
16002#define _SC_2_FORT_DEV _SC_2_FORT_DEV
16003#define _SC_2_FORT_RUN _SC_2_FORT_RUN
16004#define _SC_2_SW_DEV _SC_2_SW_DEV
16005#define _SC_2_LOCALEDEF _SC_2_LOCALEDEF
16006#define _SC_PII _SC_PII
16007#define _SC_PII_XTI _SC_PII_XTI
16008#define _SC_PII_SOCKET _SC_PII_SOCKET
16009#define _SC_PII_INTERNET _SC_PII_INTERNET
16010#define _SC_PII_OSI _SC_PII_OSI
16011#define _SC_POLL _SC_POLL
16012#define _SC_SELECT _SC_SELECT
16013#define _SC_UIO_MAXIOV _SC_UIO_MAXIOV
16014#define _SC_IOV_MAX _SC_IOV_MAX
16015#define _SC_PII_INTERNET_STREAM _SC_PII_INTERNET_STREAM
16016#define _SC_PII_INTERNET_DGRAM _SC_PII_INTERNET_DGRAM
16017#define _SC_PII_OSI_COTS _SC_PII_OSI_COTS
16018#define _SC_PII_OSI_CLTS _SC_PII_OSI_CLTS
16019#define _SC_PII_OSI_M _SC_PII_OSI_M
16020#define _SC_T_IOV_MAX _SC_T_IOV_MAX
16021#define _SC_THREADS _SC_THREADS
16022#define _SC_THREAD_SAFE_FUNCTIONS _SC_THREAD_SAFE_FUNCTIONS
16023#define _SC_GETGR_R_SIZE_MAX _SC_GETGR_R_SIZE_MAX
16024#define _SC_GETPW_R_SIZE_MAX _SC_GETPW_R_SIZE_MAX
16025#define _SC_LOGIN_NAME_MAX _SC_LOGIN_NAME_MAX
16026#define _SC_TTY_NAME_MAX _SC_TTY_NAME_MAX
16027#define _SC_THREAD_DESTRUCTOR_ITERATIONS _SC_THREAD_DESTRUCTOR_ITERATIONS
16028#define _SC_THREAD_KEYS_MAX _SC_THREAD_KEYS_MAX
16029#define _SC_THREAD_STACK_MIN _SC_THREAD_STACK_MIN
16030#define _SC_THREAD_THREADS_MAX _SC_THREAD_THREADS_MAX
16031#define _SC_THREAD_ATTR_STACKADDR _SC_THREAD_ATTR_STACKADDR
16032#define _SC_THREAD_ATTR_STACKSIZE _SC_THREAD_ATTR_STACKSIZE
16033#define _SC_THREAD_PRIORITY_SCHEDULING _SC_THREAD_PRIORITY_SCHEDULING
16034#define _SC_THREAD_PRIO_INHERIT _SC_THREAD_PRIO_INHERIT
16035#define _SC_THREAD_PRIO_PROTECT _SC_THREAD_PRIO_PROTECT
16036#define _SC_THREAD_PROCESS_SHARED _SC_THREAD_PROCESS_SHARED
16037#define _SC_NPROCESSORS_CONF _SC_NPROCESSORS_CONF
16038#define _SC_NPROCESSORS_ONLN _SC_NPROCESSORS_ONLN
16039#define _SC_PHYS_PAGES _SC_PHYS_PAGES
16040#define _SC_AVPHYS_PAGES _SC_AVPHYS_PAGES
16041#define _SC_ATEXIT_MAX _SC_ATEXIT_MAX
16042#define _SC_PASS_MAX _SC_PASS_MAX
16043#define _SC_XOPEN_VERSION _SC_XOPEN_VERSION
16044#define _SC_XOPEN_XCU_VERSION _SC_XOPEN_XCU_VERSION
16045#define _SC_XOPEN_UNIX _SC_XOPEN_UNIX
16046#define _SC_XOPEN_CRYPT _SC_XOPEN_CRYPT
16047#define _SC_XOPEN_ENH_I18N _SC_XOPEN_ENH_I18N
16048#define _SC_XOPEN_SHM _SC_XOPEN_SHM
16049#define _SC_2_CHAR_TERM _SC_2_CHAR_TERM
16050#define _SC_2_C_VERSION _SC_2_C_VERSION
16051#define _SC_2_UPE _SC_2_UPE
16052#define _SC_XOPEN_XPG2 _SC_XOPEN_XPG2
16053#define _SC_XOPEN_XPG3 _SC_XOPEN_XPG3
16054#define _SC_XOPEN_XPG4 _SC_XOPEN_XPG4
16055#define _SC_CHAR_BIT _SC_CHAR_BIT
16056#define _SC_CHAR_MAX _SC_CHAR_MAX
16057#define _SC_CHAR_MIN _SC_CHAR_MIN
16058#define _SC_INT_MAX _SC_INT_MAX
16059#define _SC_INT_MIN _SC_INT_MIN
16060#define _SC_LONG_BIT _SC_LONG_BIT
16061#define _SC_WORD_BIT _SC_WORD_BIT
16062#define _SC_MB_LEN_MAX _SC_MB_LEN_MAX
16063#define _SC_NZERO _SC_NZERO
16064#define _SC_SSIZE_MAX _SC_SSIZE_MAX
16065#define _SC_SCHAR_MAX _SC_SCHAR_MAX
16066#define _SC_SCHAR_MIN _SC_SCHAR_MIN
16067#define _SC_SHRT_MAX _SC_SHRT_MAX
16068#define _SC_SHRT_MIN _SC_SHRT_MIN
16069#define _SC_UCHAR_MAX _SC_UCHAR_MAX
16070#define _SC_UINT_MAX _SC_UINT_MAX
16071#define _SC_ULONG_MAX _SC_ULONG_MAX
16072#define _SC_USHRT_MAX _SC_USHRT_MAX
16073#define _SC_NL_ARGMAX _SC_NL_ARGMAX
16074#define _SC_NL_LANGMAX _SC_NL_LANGMAX
16075#define _SC_NL_MSGMAX _SC_NL_MSGMAX
16076#define _SC_NL_NMAX _SC_NL_NMAX
16077#define _SC_NL_SETMAX _SC_NL_SETMAX
16078#define _SC_NL_TEXTMAX _SC_NL_TEXTMAX
16079#define _SC_XBS5_ILP32_OFF32 _SC_XBS5_ILP32_OFF32
16080#define _SC_XBS5_ILP32_OFFBIG _SC_XBS5_ILP32_OFFBIG
16081#define _SC_XBS5_LP64_OFF64 _SC_XBS5_LP64_OFF64
16082#define _SC_XBS5_LPBIG_OFFBIG _SC_XBS5_LPBIG_OFFBIG
16083#define _SC_XOPEN_LEGACY _SC_XOPEN_LEGACY
16084#define _SC_XOPEN_REALTIME _SC_XOPEN_REALTIME
16085#define _SC_XOPEN_REALTIME_THREADS _SC_XOPEN_REALTIME_THREADS
16086#define _SC_ADVISORY_INFO _SC_ADVISORY_INFO
16087#define _SC_BARRIERS _SC_BARRIERS
16088#define _SC_BASE _SC_BASE
16089#define _SC_C_LANG_SUPPORT _SC_C_LANG_SUPPORT
16090#define _SC_C_LANG_SUPPORT_R _SC_C_LANG_SUPPORT_R
16091#define _SC_CLOCK_SELECTION _SC_CLOCK_SELECTION
16092#define _SC_CPUTIME _SC_CPUTIME
16093#define _SC_THREAD_CPUTIME _SC_THREAD_CPUTIME
16094#define _SC_DEVICE_IO _SC_DEVICE_IO
16095#define _SC_DEVICE_SPECIFIC _SC_DEVICE_SPECIFIC
16096#define _SC_DEVICE_SPECIFIC_R _SC_DEVICE_SPECIFIC_R
16097#define _SC_FD_MGMT _SC_FD_MGMT
16098#define _SC_FIFO _SC_FIFO
16099#define _SC_PIPE _SC_PIPE
16100#define _SC_FILE_ATTRIBUTES _SC_FILE_ATTRIBUTES
16101#define _SC_FILE_LOCKING _SC_FILE_LOCKING
16102#define _SC_FILE_SYSTEM _SC_FILE_SYSTEM
16103#define _SC_MONOTONIC_CLOCK _SC_MONOTONIC_CLOCK
16104#define _SC_MULTI_PROCESS _SC_MULTI_PROCESS
16105#define _SC_SINGLE_PROCESS _SC_SINGLE_PROCESS
16106#define _SC_NETWORKING _SC_NETWORKING
16107#define _SC_READER_WRITER_LOCKS _SC_READER_WRITER_LOCKS
16108#define _SC_SPIN_LOCKS _SC_SPIN_LOCKS
16109#define _SC_REGEXP _SC_REGEXP
16110#define _SC_REGEX_VERSION _SC_REGEX_VERSION
16111#define _SC_SHELL _SC_SHELL
16112#define _SC_SIGNALS _SC_SIGNALS
16113#define _SC_SPAWN _SC_SPAWN
16114#define _SC_SPORADIC_SERVER _SC_SPORADIC_SERVER
16115#define _SC_THREAD_SPORADIC_SERVER _SC_THREAD_SPORADIC_SERVER
16116#define _SC_SYSTEM_DATABASE _SC_SYSTEM_DATABASE
16117#define _SC_SYSTEM_DATABASE_R _SC_SYSTEM_DATABASE_R
16118#define _SC_TIMEOUTS _SC_TIMEOUTS
16119#define _SC_TYPED_MEMORY_OBJECTS _SC_TYPED_MEMORY_OBJECTS
16120#define _SC_USER_GROUPS _SC_USER_GROUPS
16121#define _SC_USER_GROUPS_R _SC_USER_GROUPS_R
16122#define _SC_2_PBS _SC_2_PBS
16123#define _SC_2_PBS_ACCOUNTING _SC_2_PBS_ACCOUNTING
16124#define _SC_2_PBS_LOCATE _SC_2_PBS_LOCATE
16125#define _SC_2_PBS_MESSAGE _SC_2_PBS_MESSAGE
16126#define _SC_2_PBS_TRACK _SC_2_PBS_TRACK
16127#define _SC_SYMLOOP_MAX _SC_SYMLOOP_MAX
16128#define _SC_STREAMS _SC_STREAMS
16129#define _SC_2_PBS_CHECKPOINT _SC_2_PBS_CHECKPOINT
16130#define _SC_V6_ILP32_OFF32 _SC_V6_ILP32_OFF32
16131#define _SC_V6_ILP32_OFFBIG _SC_V6_ILP32_OFFBIG
16132#define _SC_V6_LP64_OFF64 _SC_V6_LP64_OFF64
16133#define _SC_V6_LPBIG_OFFBIG _SC_V6_LPBIG_OFFBIG
16134#define _SC_HOST_NAME_MAX _SC_HOST_NAME_MAX
16135#define _SC_TRACE _SC_TRACE
16136#define _SC_TRACE_EVENT_FILTER _SC_TRACE_EVENT_FILTER
16137#define _SC_TRACE_INHERIT _SC_TRACE_INHERIT
16138#define _SC_TRACE_LOG _SC_TRACE_LOG
16139#define _SC_LEVEL1_ICACHE_SIZE _SC_LEVEL1_ICACHE_SIZE
16140#define _SC_LEVEL1_ICACHE_ASSOC _SC_LEVEL1_ICACHE_ASSOC
16141#define _SC_LEVEL1_ICACHE_LINESIZE _SC_LEVEL1_ICACHE_LINESIZE
16142#define _SC_LEVEL1_DCACHE_SIZE _SC_LEVEL1_DCACHE_SIZE
16143#define _SC_LEVEL1_DCACHE_ASSOC _SC_LEVEL1_DCACHE_ASSOC
16144#define _SC_LEVEL1_DCACHE_LINESIZE _SC_LEVEL1_DCACHE_LINESIZE
16145#define _SC_LEVEL2_CACHE_SIZE _SC_LEVEL2_CACHE_SIZE
16146#define _SC_LEVEL2_CACHE_ASSOC _SC_LEVEL2_CACHE_ASSOC
16147#define _SC_LEVEL2_CACHE_LINESIZE _SC_LEVEL2_CACHE_LINESIZE
16148#define _SC_LEVEL3_CACHE_SIZE _SC_LEVEL3_CACHE_SIZE
16149#define _SC_LEVEL3_CACHE_ASSOC _SC_LEVEL3_CACHE_ASSOC
16150#define _SC_LEVEL3_CACHE_LINESIZE _SC_LEVEL3_CACHE_LINESIZE
16151#define _SC_LEVEL4_CACHE_SIZE _SC_LEVEL4_CACHE_SIZE
16152#define _SC_LEVEL4_CACHE_ASSOC _SC_LEVEL4_CACHE_ASSOC
16153#define _SC_LEVEL4_CACHE_LINESIZE _SC_LEVEL4_CACHE_LINESIZE
16154#define _SC_IPV6 _SC_IPV6
16155#define _SC_RAW_SOCKETS _SC_RAW_SOCKETS
16156#define _SC_V7_ILP32_OFF32 _SC_V7_ILP32_OFF32
16157#define _SC_V7_ILP32_OFFBIG _SC_V7_ILP32_OFFBIG
16158#define _SC_V7_LP64_OFF64 _SC_V7_LP64_OFF64
16159#define _SC_V7_LPBIG_OFFBIG _SC_V7_LPBIG_OFFBIG
16160#define _SC_SS_REPL_MAX _SC_SS_REPL_MAX
16161#define _SC_TRACE_EVENT_NAME_MAX _SC_TRACE_EVENT_NAME_MAX
16162#define _SC_TRACE_NAME_MAX _SC_TRACE_NAME_MAX
16163#define _SC_TRACE_SYS_MAX _SC_TRACE_SYS_MAX
16164#define _SC_TRACE_USER_EVENT_MAX _SC_TRACE_USER_EVENT_MAX
16165#define _SC_XOPEN_STREAMS _SC_XOPEN_STREAMS
16166#define _SC_THREAD_ROBUST_PRIO_INHERIT _SC_THREAD_ROBUST_PRIO_INHERIT
16167#define _SC_THREAD_ROBUST_PRIO_PROTECT _SC_THREAD_ROBUST_PRIO_PROTECT
16168#define _CS_PATH _CS_PATH
16169#define _CS_V6_WIDTH_RESTRICTED_ENVS _CS_V6_WIDTH_RESTRICTED_ENVS
16170#define _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS _CS_V6_WIDTH_RESTRICTED_ENVS
16171#define _CS_GNU_LIBC_VERSION _CS_GNU_LIBC_VERSION
16172#define _CS_GNU_LIBPTHREAD_VERSION _CS_GNU_LIBPTHREAD_VERSION
16173#define _CS_V5_WIDTH_RESTRICTED_ENVS _CS_V5_WIDTH_RESTRICTED_ENVS
16174#define _CS_POSIX_V5_WIDTH_RESTRICTED_ENVS _CS_V5_WIDTH_RESTRICTED_ENVS
16175#define _CS_V7_WIDTH_RESTRICTED_ENVS _CS_V7_WIDTH_RESTRICTED_ENVS
16176#define _CS_POSIX_V7_WIDTH_RESTRICTED_ENVS _CS_V7_WIDTH_RESTRICTED_ENVS
16177#define _CS_LFS_CFLAGS _CS_LFS_CFLAGS
16178#define _CS_LFS_LDFLAGS _CS_LFS_LDFLAGS
16179#define _CS_LFS_LIBS _CS_LFS_LIBS
16180#define _CS_LFS_LINTFLAGS _CS_LFS_LINTFLAGS
16181#define _CS_LFS64_CFLAGS _CS_LFS64_CFLAGS
16182#define _CS_LFS64_LDFLAGS _CS_LFS64_LDFLAGS
16183#define _CS_LFS64_LIBS _CS_LFS64_LIBS
16184#define _CS_LFS64_LINTFLAGS _CS_LFS64_LINTFLAGS
16185#define _CS_XBS5_ILP32_OFF32_CFLAGS _CS_XBS5_ILP32_OFF32_CFLAGS
16186#define _CS_XBS5_ILP32_OFF32_LDFLAGS _CS_XBS5_ILP32_OFF32_LDFLAGS
16187#define _CS_XBS5_ILP32_OFF32_LIBS _CS_XBS5_ILP32_OFF32_LIBS
16188#define _CS_XBS5_ILP32_OFF32_LINTFLAGS _CS_XBS5_ILP32_OFF32_LINTFLAGS
16189#define _CS_XBS5_ILP32_OFFBIG_CFLAGS _CS_XBS5_ILP32_OFFBIG_CFLAGS
16190#define _CS_XBS5_ILP32_OFFBIG_LDFLAGS _CS_XBS5_ILP32_OFFBIG_LDFLAGS
16191#define _CS_XBS5_ILP32_OFFBIG_LIBS _CS_XBS5_ILP32_OFFBIG_LIBS
16192#define _CS_XBS5_ILP32_OFFBIG_LINTFLAGS _CS_XBS5_ILP32_OFFBIG_LINTFLAGS
16193#define _CS_XBS5_LP64_OFF64_CFLAGS _CS_XBS5_LP64_OFF64_CFLAGS
16194#define _CS_XBS5_LP64_OFF64_LDFLAGS _CS_XBS5_LP64_OFF64_LDFLAGS
16195#define _CS_XBS5_LP64_OFF64_LIBS _CS_XBS5_LP64_OFF64_LIBS
16196#define _CS_XBS5_LP64_OFF64_LINTFLAGS _CS_XBS5_LP64_OFF64_LINTFLAGS
16197#define _CS_XBS5_LPBIG_OFFBIG_CFLAGS _CS_XBS5_LPBIG_OFFBIG_CFLAGS
16198#define _CS_XBS5_LPBIG_OFFBIG_LDFLAGS _CS_XBS5_LPBIG_OFFBIG_LDFLAGS
16199#define _CS_XBS5_LPBIG_OFFBIG_LIBS _CS_XBS5_LPBIG_OFFBIG_LIBS
16200#define _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS
16201#define _CS_POSIX_V6_ILP32_OFF32_CFLAGS _CS_POSIX_V6_ILP32_OFF32_CFLAGS
16202#define _CS_POSIX_V6_ILP32_OFF32_LDFLAGS _CS_POSIX_V6_ILP32_OFF32_LDFLAGS
16203#define _CS_POSIX_V6_ILP32_OFF32_LIBS _CS_POSIX_V6_ILP32_OFF32_LIBS
16204#define _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS
16205#define _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS
16206#define _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS
16207#define _CS_POSIX_V6_ILP32_OFFBIG_LIBS _CS_POSIX_V6_ILP32_OFFBIG_LIBS
16208#define _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS
16209#define _CS_POSIX_V6_LP64_OFF64_CFLAGS _CS_POSIX_V6_LP64_OFF64_CFLAGS
16210#define _CS_POSIX_V6_LP64_OFF64_LDFLAGS _CS_POSIX_V6_LP64_OFF64_LDFLAGS
16211#define _CS_POSIX_V6_LP64_OFF64_LIBS _CS_POSIX_V6_LP64_OFF64_LIBS
16212#define _CS_POSIX_V6_LP64_OFF64_LINTFLAGS _CS_POSIX_V6_LP64_OFF64_LINTFLAGS
16213#define _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS
16214#define _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS
16215#define _CS_POSIX_V6_LPBIG_OFFBIG_LIBS _CS_POSIX_V6_LPBIG_OFFBIG_LIBS
16216#define _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS
16217#define _CS_POSIX_V7_ILP32_OFF32_CFLAGS _CS_POSIX_V7_ILP32_OFF32_CFLAGS
16218#define _CS_POSIX_V7_ILP32_OFF32_LDFLAGS _CS_POSIX_V7_ILP32_OFF32_LDFLAGS
16219#define _CS_POSIX_V7_ILP32_OFF32_LIBS _CS_POSIX_V7_ILP32_OFF32_LIBS
16220#define _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS
16221#define _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS
16222#define _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS
16223#define _CS_POSIX_V7_ILP32_OFFBIG_LIBS _CS_POSIX_V7_ILP32_OFFBIG_LIBS
16224#define _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS
16225#define _CS_POSIX_V7_LP64_OFF64_CFLAGS _CS_POSIX_V7_LP64_OFF64_CFLAGS
16226#define _CS_POSIX_V7_LP64_OFF64_LDFLAGS _CS_POSIX_V7_LP64_OFF64_LDFLAGS
16227#define _CS_POSIX_V7_LP64_OFF64_LIBS _CS_POSIX_V7_LP64_OFF64_LIBS
16228#define _CS_POSIX_V7_LP64_OFF64_LINTFLAGS _CS_POSIX_V7_LP64_OFF64_LINTFLAGS
16229#define _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS
16230#define _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS
16231#define _CS_POSIX_V7_LPBIG_OFFBIG_LIBS _CS_POSIX_V7_LPBIG_OFFBIG_LIBS
16232#define _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS
16233#define _CS_V6_ENV _CS_V6_ENV
16234#define _CS_V7_ENV _CS_V7_ENV
16235#define _GETOPT_POSIX_H 1
16236#define _GETOPT_CORE_H 1
16237#define F_ULOCK 0
16238#define F_LOCK 1
16239#define F_TLOCK 2
16240#define F_TEST 3
16241#define TEMP_FAILURE_RETRY(expression) (__extension__ ({ long int __result; do __result = (long int) (expression); while (__result == -1L && errno == EINTR); __result; }))
16242#define RUBY_MISSING_H 1
16243#define _MATH_H 1
16244#define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
16245#undef __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
16246#undef __GLIBC_USE_LIB_EXT2
16247#define __GLIBC_USE_LIB_EXT2 1
16248#undef __GLIBC_USE_IEC_60559_BFP_EXT
16249#define __GLIBC_USE_IEC_60559_BFP_EXT 1
16250#undef __GLIBC_USE_IEC_60559_BFP_EXT_C2X
16251#define __GLIBC_USE_IEC_60559_BFP_EXT_C2X 1
16252#undef __GLIBC_USE_IEC_60559_FUNCS_EXT
16253#define __GLIBC_USE_IEC_60559_FUNCS_EXT 1
16254#undef __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X
16255#define __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X 1
16256#undef __GLIBC_USE_IEC_60559_TYPES_EXT
16257#define __GLIBC_USE_IEC_60559_TYPES_EXT 1
16258#define _BITS_LIBM_SIMD_DECL_STUBS_H 1
16259#define __DECL_SIMD_cos
16260#define __DECL_SIMD_cosf
16261#define __DECL_SIMD_cosl
16262#define __DECL_SIMD_cosf16
16263#define __DECL_SIMD_cosf32
16264#define __DECL_SIMD_cosf64
16265#define __DECL_SIMD_cosf128
16266#define __DECL_SIMD_cosf32x
16267#define __DECL_SIMD_cosf64x
16268#define __DECL_SIMD_cosf128x
16269#define __DECL_SIMD_sin
16270#define __DECL_SIMD_sinf
16271#define __DECL_SIMD_sinl
16272#define __DECL_SIMD_sinf16
16273#define __DECL_SIMD_sinf32
16274#define __DECL_SIMD_sinf64
16275#define __DECL_SIMD_sinf128
16276#define __DECL_SIMD_sinf32x
16277#define __DECL_SIMD_sinf64x
16278#define __DECL_SIMD_sinf128x
16279#define __DECL_SIMD_sincos
16280#define __DECL_SIMD_sincosf
16281#define __DECL_SIMD_sincosl
16282#define __DECL_SIMD_sincosf16
16283#define __DECL_SIMD_sincosf32
16284#define __DECL_SIMD_sincosf64
16285#define __DECL_SIMD_sincosf128
16286#define __DECL_SIMD_sincosf32x
16287#define __DECL_SIMD_sincosf64x
16288#define __DECL_SIMD_sincosf128x
16289#define __DECL_SIMD_log
16290#define __DECL_SIMD_logf
16291#define __DECL_SIMD_logl
16292#define __DECL_SIMD_logf16
16293#define __DECL_SIMD_logf32
16294#define __DECL_SIMD_logf64
16295#define __DECL_SIMD_logf128
16296#define __DECL_SIMD_logf32x
16297#define __DECL_SIMD_logf64x
16298#define __DECL_SIMD_logf128x
16299#define __DECL_SIMD_exp
16300#define __DECL_SIMD_expf
16301#define __DECL_SIMD_expl
16302#define __DECL_SIMD_expf16
16303#define __DECL_SIMD_expf32
16304#define __DECL_SIMD_expf64
16305#define __DECL_SIMD_expf128
16306#define __DECL_SIMD_expf32x
16307#define __DECL_SIMD_expf64x
16308#define __DECL_SIMD_expf128x
16309#define __DECL_SIMD_pow
16310#define __DECL_SIMD_powf
16311#define __DECL_SIMD_powl
16312#define __DECL_SIMD_powf16
16313#define __DECL_SIMD_powf32
16314#define __DECL_SIMD_powf64
16315#define __DECL_SIMD_powf128
16316#define __DECL_SIMD_powf32x
16317#define __DECL_SIMD_powf64x
16318#define __DECL_SIMD_powf128x
16319#define HUGE_VAL (__builtin_huge_val ())
16320#define HUGE_VALF (__builtin_huge_valf ())
16321#define HUGE_VALL (__builtin_huge_vall ())
16322#define HUGE_VAL_F32 (__builtin_huge_valf32 ())
16323#define HUGE_VAL_F64 (__builtin_huge_valf64 ())
16324#define HUGE_VAL_F128 (__builtin_huge_valf128 ())
16325#define HUGE_VAL_F32X (__builtin_huge_valf32x ())
16326#define HUGE_VAL_F64X (__builtin_huge_valf64x ())
16327#define INFINITY (__builtin_inff ())
16328#define NAN (__builtin_nanf (""))
16329#define SNANF (__builtin_nansf (""))
16330#define SNAN (__builtin_nans (""))
16331#define SNANL (__builtin_nansl (""))
16332#define SNANF32 (__builtin_nansf32 (""))
16333#define SNANF64 (__builtin_nansf64 (""))
16334#define SNANF128 (__builtin_nansf128 (""))
16335#define SNANF32X (__builtin_nansf32x (""))
16336#define SNANF64X (__builtin_nansf64x (""))
16337#define __GLIBC_FLT_EVAL_METHOD __FLT_EVAL_METHOD__
16338#define __FP_LOGB0_IS_MIN 1
16339#define __FP_LOGBNAN_IS_MIN 1
16340#define FP_ILOGB0 (-2147483647 - 1)
16341#define FP_ILOGBNAN (-2147483647 - 1)
16342#define __FP_LONG_MAX 0x7fffffffffffffffL
16343#define FP_LLOGB0 (-__FP_LONG_MAX - 1)
16344#define FP_LLOGBNAN (-__FP_LONG_MAX - 1)
16345#define FP_INT_UPWARD 0
16346#define FP_INT_DOWNWARD 1
16347#define FP_INT_TOWARDZERO 2
16348#define FP_INT_TONEARESTFROMZERO 3
16349#define FP_INT_TONEAREST 4
16350#define __SIMD_DECL(function) __CONCAT (__DECL_SIMD_, function)
16351#define __MATHCALL_VEC(function,suffix,args) __SIMD_DECL (__MATH_PRECNAME (function, suffix)) __MATHCALL (function, suffix, args)
16352#define __MATHDECL_VEC(type,function,suffix,args) __SIMD_DECL (__MATH_PRECNAME (function, suffix)) __MATHDECL(type, function,suffix, args)
16353#define __MATHCALL(function,suffix,args) __MATHDECL (_Mdouble_,function,suffix, args)
16354#define __MATHDECL(type,function,suffix,args) __MATHDECL_1(type, function,suffix, args); __MATHDECL_1(type, __CONCAT(__,function),suffix, args)
16355#define __MATHCALLX(function,suffix,args,attrib) __MATHDECLX (_Mdouble_,function,suffix, args, attrib)
16356#define __MATHDECLX(type,function,suffix,args,attrib) __MATHDECL_1(type, function,suffix, args) __attribute__ (attrib); __MATHDECL_1(type, __CONCAT(__,function),suffix, args) __attribute__ (attrib)
16357#define __MATHDECL_1_IMPL(type,function,suffix,args) extern type __MATH_PRECNAME(function,suffix) args __THROW
16358#define __MATHDECL_1(type,function,suffix,args) __MATHDECL_1_IMPL(type, function, suffix, args)
16359#define __MATHDECL_ALIAS(type,function,suffix,args,alias) __MATHDECL_1(type, function, suffix, args)
16360#define __MATHREDIR(type,function,suffix,args,to) extern type __REDIRECT_NTH (__MATH_PRECNAME (function, suffix), args, to)
16361#define _Mdouble_ double
16362#define __MATH_PRECNAME(name,r) __CONCAT(name,r)
16363#define __MATH_DECLARING_DOUBLE 1
16364#define __MATH_DECLARING_FLOATN 0
16365#undef _Mdouble_
16366#undef __MATH_PRECNAME
16367#undef __MATH_DECLARING_DOUBLE
16368#undef __MATH_DECLARING_FLOATN
16369#define _Mdouble_ float
16370#define __MATH_PRECNAME(name,r) name ##f ##r
16371#define __MATH_DECLARING_DOUBLE 0
16372#define __MATH_DECLARING_FLOATN 0
16373#undef _Mdouble_
16374#undef __MATH_PRECNAME
16375#undef __MATH_DECLARING_DOUBLE
16376#undef __MATH_DECLARING_FLOATN
16377#define _Mdouble_ long double
16378#define __MATH_PRECNAME(name,r) name ##l ##r
16379#define __MATH_DECLARING_DOUBLE 0
16380#define __MATH_DECLARING_FLOATN 0
16381#define __MATH_DECLARE_LDOUBLE 1
16382#undef _Mdouble_
16383#undef __MATH_PRECNAME
16384#undef __MATH_DECLARING_DOUBLE
16385#undef __MATH_DECLARING_FLOATN
16386#define _Mdouble_ _Float32
16387#define __MATH_PRECNAME(name,r) name ##f32 ##r
16388#define __MATH_DECLARING_DOUBLE 0
16389#define __MATH_DECLARING_FLOATN 1
16390#undef _Mdouble_
16391#undef __MATH_PRECNAME
16392#undef __MATH_DECLARING_DOUBLE
16393#undef __MATH_DECLARING_FLOATN
16394#define _Mdouble_ _Float64
16395#define __MATH_PRECNAME(name,r) name ##f64 ##r
16396#define __MATH_DECLARING_DOUBLE 0
16397#define __MATH_DECLARING_FLOATN 1
16398#undef _Mdouble_
16399#undef __MATH_PRECNAME
16400#undef __MATH_DECLARING_DOUBLE
16401#undef __MATH_DECLARING_FLOATN
16402#define _Mdouble_ _Float128
16403#define __MATH_PRECNAME(name,r) name ##f128 ##r
16404#define __MATH_DECLARING_DOUBLE 0
16405#define __MATH_DECLARING_FLOATN 1
16406#undef _Mdouble_
16407#undef __MATH_PRECNAME
16408#undef __MATH_DECLARING_DOUBLE
16409#undef __MATH_DECLARING_FLOATN
16410#define _Mdouble_ _Float32x
16411#define __MATH_PRECNAME(name,r) name ##f32x ##r
16412#define __MATH_DECLARING_DOUBLE 0
16413#define __MATH_DECLARING_FLOATN 1
16414#undef _Mdouble_
16415#undef __MATH_PRECNAME
16416#undef __MATH_DECLARING_DOUBLE
16417#undef __MATH_DECLARING_FLOATN
16418#define _Mdouble_ _Float64x
16419#define __MATH_PRECNAME(name,r) name ##f64x ##r
16420#define __MATH_DECLARING_DOUBLE 0
16421#define __MATH_DECLARING_FLOATN 1
16422#undef _Mdouble_
16423#undef __MATH_PRECNAME
16424#undef __MATH_DECLARING_DOUBLE
16425#undef __MATH_DECLARING_FLOATN
16426#undef __MATHDECL_1_IMPL
16427#undef __MATHDECL_1
16428#undef __MATHDECL_ALIAS
16429#undef __MATHDECL
16430#undef __MATHCALL
16431#define __MATHCALL_NARROW_ARGS_1 (_Marg_ __x)
16432#define __MATHCALL_NARROW_ARGS_2 (_Marg_ __x, _Marg_ __y)
16433#define __MATHCALL_NARROW_ARGS_3 (_Marg_ __x, _Marg_ __y, _Marg_ __z)
16434#define __MATHCALL_NARROW_NORMAL(func,nargs) extern _Mret_ func __MATHCALL_NARROW_ARGS_ ## nargs __THROW
16435#define __MATHCALL_NARROW_REDIR(func,redir,nargs) extern _Mret_ __REDIRECT_NTH (func, __MATHCALL_NARROW_ARGS_ ## nargs, redir)
16436#define __MATHCALL_NARROW(func,redir,nargs) __MATHCALL_NARROW_NORMAL (func, nargs)
16437#define _Mret_ float
16438#define _Marg_ double
16439#define __MATHCALL_NAME(name) f ## name
16440#undef _Mret_
16441#undef _Marg_
16442#undef __MATHCALL_NAME
16443#define _Mret_ float
16444#define _Marg_ long double
16445#define __MATHCALL_NAME(name) f ## name ## l
16446#undef _Mret_
16447#undef _Marg_
16448#undef __MATHCALL_NAME
16449#define _Mret_ double
16450#define _Marg_ long double
16451#define __MATHCALL_NAME(name) d ## name ## l
16452#undef _Mret_
16453#undef _Marg_
16454#undef __MATHCALL_NAME
16455#define _Mret_ _Float32
16456#define _Marg_ _Float32x
16457#define __MATHCALL_NAME(name) f32 ## name ## f32x
16458#undef _Mret_
16459#undef _Marg_
16460#undef __MATHCALL_NAME
16461#define _Mret_ _Float32
16462#define _Marg_ _Float64
16463#define __MATHCALL_NAME(name) f32 ## name ## f64
16464#undef _Mret_
16465#undef _Marg_
16466#undef __MATHCALL_NAME
16467#define _Mret_ _Float32
16468#define _Marg_ _Float64x
16469#define __MATHCALL_NAME(name) f32 ## name ## f64x
16470#undef _Mret_
16471#undef _Marg_
16472#undef __MATHCALL_NAME
16473#define _Mret_ _Float32
16474#define _Marg_ _Float128
16475#define __MATHCALL_NAME(name) f32 ## name ## f128
16476#undef _Mret_
16477#undef _Marg_
16478#undef __MATHCALL_NAME
16479#define _Mret_ _Float32x
16480#define _Marg_ _Float64
16481#define __MATHCALL_NAME(name) f32x ## name ## f64
16482#undef _Mret_
16483#undef _Marg_
16484#undef __MATHCALL_NAME
16485#define _Mret_ _Float32x
16486#define _Marg_ _Float64x
16487#define __MATHCALL_NAME(name) f32x ## name ## f64x
16488#undef _Mret_
16489#undef _Marg_
16490#undef __MATHCALL_NAME
16491#define _Mret_ _Float32x
16492#define _Marg_ _Float128
16493#define __MATHCALL_NAME(name) f32x ## name ## f128
16494#undef _Mret_
16495#undef _Marg_
16496#undef __MATHCALL_NAME
16497#define _Mret_ _Float64
16498#define _Marg_ _Float64x
16499#define __MATHCALL_NAME(name) f64 ## name ## f64x
16500#undef _Mret_
16501#undef _Marg_
16502#undef __MATHCALL_NAME
16503#define _Mret_ _Float64
16504#define _Marg_ _Float128
16505#define __MATHCALL_NAME(name) f64 ## name ## f128
16506#undef _Mret_
16507#undef _Marg_
16508#undef __MATHCALL_NAME
16509#define _Mret_ _Float64x
16510#define _Marg_ _Float128
16511#define __MATHCALL_NAME(name) f64x ## name ## f128
16512#undef _Mret_
16513#undef _Marg_
16514#undef __MATHCALL_NAME
16515#undef __MATHCALL_NARROW_ARGS_1
16516#undef __MATHCALL_NARROW_ARGS_2
16517#undef __MATHCALL_NARROW_ARGS_3
16518#undef __MATHCALL_NARROW_NORMAL
16519#undef __MATHCALL_NARROW_REDIR
16520#undef __MATHCALL_NARROW
16521#define __MATH_TG_F32(FUNC,ARGS) _Float32: FUNC ## f ARGS,
16522#define __MATH_TG_F64X(FUNC,ARGS) _Float64x: FUNC ## l ARGS,
16523#define __MATH_TG(TG_ARG,FUNC,ARGS) _Generic ((TG_ARG), float: FUNC ## f ARGS, __MATH_TG_F32 (FUNC, ARGS) default: FUNC ARGS, long double: FUNC ## l ARGS, __MATH_TG_F64X (FUNC, ARGS) _Float128: FUNC ## f128 ARGS)
16524#define FP_NAN 0
16525#define FP_INFINITE 1
16526#define FP_ZERO 2
16527#define FP_SUBNORMAL 3
16528#define FP_NORMAL 4
16529#define fpclassify(x) __builtin_fpclassify (FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, x)
16530#define signbit(x) __builtin_signbit (x)
16531#define isfinite(x) __builtin_isfinite (x)
16532#define isnormal(x) __builtin_isnormal (x)
16533#define isnan(x) __builtin_isnan (x)
16534#define isinf(x) __builtin_isinf_sign (x)
16535#define MATH_ERRNO 1
16536#define MATH_ERREXCEPT 2
16537#define math_errhandling (MATH_ERRNO | MATH_ERREXCEPT)
16538#define __iscanonicalf(x) ((void) (__typeof (x)) (x), 1)
16539#define __iscanonical(x) ((void) (__typeof (x)) (x), 1)
16540#define __iscanonicalf128(x) ((void) (__typeof (x)) (x), 1)
16541#define iscanonical(x) __MATH_TG ((x), __iscanonical, (x))
16542#define issignaling(x) __MATH_TG ((x), __issignaling, (x))
16543#define issubnormal(x) (fpclassify (x) == FP_SUBNORMAL)
16544#define iszero(x) (((__typeof (x)) (x)) == 0)
16545#define MAXFLOAT 3.40282347e+38F
16546#define M_E 2.7182818284590452354
16547#define M_LOG2E 1.4426950408889634074
16548#define M_LOG10E 0.43429448190325182765
16549#define M_LN2 0.69314718055994530942
16550#define M_LN10 2.30258509299404568402
16551#define M_PI 3.14159265358979323846
16552#define M_PI_2 1.57079632679489661923
16553#define M_PI_4 0.78539816339744830962
16554#define M_1_PI 0.31830988618379067154
16555#define M_2_PI 0.63661977236758134308
16556#define M_2_SQRTPI 1.12837916709551257390
16557#define M_SQRT2 1.41421356237309504880
16558#define M_SQRT1_2 0.70710678118654752440
16559#define M_El 2.718281828459045235360287471352662498L
16560#define M_LOG2El 1.442695040888963407359924681001892137L
16561#define M_LOG10El 0.434294481903251827651128918916605082L
16562#define M_LN2l 0.693147180559945309417232121458176568L
16563#define M_LN10l 2.302585092994045684017991454684364208L
16564#define M_PIl 3.141592653589793238462643383279502884L
16565#define M_PI_2l 1.570796326794896619231321691639751442L
16566#define M_PI_4l 0.785398163397448309615660845819875721L
16567#define M_1_PIl 0.318309886183790671537767526745028724L
16568#define M_2_PIl 0.636619772367581343075535053490057448L
16569#define M_2_SQRTPIl 1.128379167095512573896158903121545172L
16570#define M_SQRT2l 1.414213562373095048801688724209698079L
16571#define M_SQRT1_2l 0.707106781186547524400844362104849039L
16572#define M_Ef32 __f32 (2.718281828459045235360287471352662498)
16573#define M_LOG2Ef32 __f32 (1.442695040888963407359924681001892137)
16574#define M_LOG10Ef32 __f32 (0.434294481903251827651128918916605082)
16575#define M_LN2f32 __f32 (0.693147180559945309417232121458176568)
16576#define M_LN10f32 __f32 (2.302585092994045684017991454684364208)
16577#define M_PIf32 __f32 (3.141592653589793238462643383279502884)
16578#define M_PI_2f32 __f32 (1.570796326794896619231321691639751442)
16579#define M_PI_4f32 __f32 (0.785398163397448309615660845819875721)
16580#define M_1_PIf32 __f32 (0.318309886183790671537767526745028724)
16581#define M_2_PIf32 __f32 (0.636619772367581343075535053490057448)
16582#define M_2_SQRTPIf32 __f32 (1.128379167095512573896158903121545172)
16583#define M_SQRT2f32 __f32 (1.414213562373095048801688724209698079)
16584#define M_SQRT1_2f32 __f32 (0.707106781186547524400844362104849039)
16585#define M_Ef64 __f64 (2.718281828459045235360287471352662498)
16586#define M_LOG2Ef64 __f64 (1.442695040888963407359924681001892137)
16587#define M_LOG10Ef64 __f64 (0.434294481903251827651128918916605082)
16588#define M_LN2f64 __f64 (0.693147180559945309417232121458176568)
16589#define M_LN10f64 __f64 (2.302585092994045684017991454684364208)
16590#define M_PIf64 __f64 (3.141592653589793238462643383279502884)
16591#define M_PI_2f64 __f64 (1.570796326794896619231321691639751442)
16592#define M_PI_4f64 __f64 (0.785398163397448309615660845819875721)
16593#define M_1_PIf64 __f64 (0.318309886183790671537767526745028724)
16594#define M_2_PIf64 __f64 (0.636619772367581343075535053490057448)
16595#define M_2_SQRTPIf64 __f64 (1.128379167095512573896158903121545172)
16596#define M_SQRT2f64 __f64 (1.414213562373095048801688724209698079)
16597#define M_SQRT1_2f64 __f64 (0.707106781186547524400844362104849039)
16598#define M_Ef128 __f128 (2.718281828459045235360287471352662498)
16599#define M_LOG2Ef128 __f128 (1.442695040888963407359924681001892137)
16600#define M_LOG10Ef128 __f128 (0.434294481903251827651128918916605082)
16601#define M_LN2f128 __f128 (0.693147180559945309417232121458176568)
16602#define M_LN10f128 __f128 (2.302585092994045684017991454684364208)
16603#define M_PIf128 __f128 (3.141592653589793238462643383279502884)
16604#define M_PI_2f128 __f128 (1.570796326794896619231321691639751442)
16605#define M_PI_4f128 __f128 (0.785398163397448309615660845819875721)
16606#define M_1_PIf128 __f128 (0.318309886183790671537767526745028724)
16607#define M_2_PIf128 __f128 (0.636619772367581343075535053490057448)
16608#define M_2_SQRTPIf128 __f128 (1.128379167095512573896158903121545172)
16609#define M_SQRT2f128 __f128 (1.414213562373095048801688724209698079)
16610#define M_SQRT1_2f128 __f128 (0.707106781186547524400844362104849039)
16611#define M_Ef32x __f32x (2.718281828459045235360287471352662498)
16612#define M_LOG2Ef32x __f32x (1.442695040888963407359924681001892137)
16613#define M_LOG10Ef32x __f32x (0.434294481903251827651128918916605082)
16614#define M_LN2f32x __f32x (0.693147180559945309417232121458176568)
16615#define M_LN10f32x __f32x (2.302585092994045684017991454684364208)
16616#define M_PIf32x __f32x (3.141592653589793238462643383279502884)
16617#define M_PI_2f32x __f32x (1.570796326794896619231321691639751442)
16618#define M_PI_4f32x __f32x (0.785398163397448309615660845819875721)
16619#define M_1_PIf32x __f32x (0.318309886183790671537767526745028724)
16620#define M_2_PIf32x __f32x (0.636619772367581343075535053490057448)
16621#define M_2_SQRTPIf32x __f32x (1.128379167095512573896158903121545172)
16622#define M_SQRT2f32x __f32x (1.414213562373095048801688724209698079)
16623#define M_SQRT1_2f32x __f32x (0.707106781186547524400844362104849039)
16624#define M_Ef64x __f64x (2.718281828459045235360287471352662498)
16625#define M_LOG2Ef64x __f64x (1.442695040888963407359924681001892137)
16626#define M_LOG10Ef64x __f64x (0.434294481903251827651128918916605082)
16627#define M_LN2f64x __f64x (0.693147180559945309417232121458176568)
16628#define M_LN10f64x __f64x (2.302585092994045684017991454684364208)
16629#define M_PIf64x __f64x (3.141592653589793238462643383279502884)
16630#define M_PI_2f64x __f64x (1.570796326794896619231321691639751442)
16631#define M_PI_4f64x __f64x (0.785398163397448309615660845819875721)
16632#define M_1_PIf64x __f64x (0.318309886183790671537767526745028724)
16633#define M_2_PIf64x __f64x (0.636619772367581343075535053490057448)
16634#define M_2_SQRTPIf64x __f64x (1.128379167095512573896158903121545172)
16635#define M_SQRT2f64x __f64x (1.414213562373095048801688724209698079)
16636#define M_SQRT1_2f64x __f64x (0.707106781186547524400844362104849039)
16637#define isgreater(x,y) __builtin_isgreater(x, y)
16638#define isgreaterequal(x,y) __builtin_isgreaterequal(x, y)
16639#define isless(x,y) __builtin_isless(x, y)
16640#define islessequal(x,y) __builtin_islessequal(x, y)
16641#define islessgreater(x,y) __builtin_islessgreater(x, y)
16642#define isunordered(x,y) __builtin_isunordered(x, y)
16643#define __MATH_EVAL_FMT2(x,y) ((x) + (y) + 0.0f)
16644#define iseqsig(x,y) __MATH_TG (__MATH_EVAL_FMT2 (x, y), __iseqsig, ((x), (y)))
16645#undef RUBY_EXTERN
16646#define RUBY_EXTERN extern
16647#pragma GCC visibility push(default)
16648#pragma GCC visibility pop
16649#define RUBY
16650#undef _
16651#define _(args) args
16652#undef __
16653#define __(args) args
16654#define ANYARGS
16655#pragma GCC visibility push(default)
16656#define xmalloc ruby_xmalloc
16657#define xmalloc2 ruby_xmalloc2
16658#define xcalloc ruby_xcalloc
16659#define xrealloc ruby_xrealloc
16660#define xrealloc2 ruby_xrealloc2
16661#define xfree ruby_xfree
16662#define RUBY_ATTR_ALLOC_SIZE(params) __attribute__ ((alloc_size params))
16663#define USE_GC_MALLOC_OBJ_INFO_DETAILS 0
16664#define STRINGIZE(expr) STRINGIZE0(expr)
16665#define STRINGIZE0(expr) #expr
16666#define HAVE_TRUE_LONG_LONG 1
16667#define LONG_LONG long long
16668#undef RUBY_EXTERN
16669#define FALSE 0
16670#define TRUE 1
16671#define MJIT_FUNC_EXPORTED RUBY_FUNC_EXPORTED
16672#define MJIT_SYMBOL_EXPORT_BEGIN RUBY_SYMBOL_EXPORT_BEGIN
16673#define MJIT_SYMBOL_EXPORT_END RUBY_SYMBOL_EXPORT_END
16674#define RUBY_EXTERN extern
16675#define EXTERN _Pragma("message \"EXTERN is deprecated, use RUBY_EXTERN instead\""); RUBY_EXTERN
16676#define RUBY_MBCHAR_MAXSIZE INT_MAX
16677#define FLUSH_REGISTER_WINDOWS ((void)0)
16678#define PATH_SEP ":"
16679#define PATH_SEP_CHAR PATH_SEP[0]
16680#define PATH_ENV "PATH"
16681#define CASEFOLD_FILESYSTEM 0
16682#define RUBY_ALIAS_FUNCTION(prot,name,args) RUBY_ALIAS_FUNCTION_TYPE(VALUE, prot, name, args)
16683#define UNALIGNED_WORD_ACCESS 1
16684#define PACKED_STRUCT_UNALIGNED(x) PACKED_STRUCT(x)
16685#define NORETURN_STYLE_NEW 1
16686#pragma GCC visibility pop
16687#define ASSUME(x) (RB_LIKELY(!!(x)) ? (void)0 : UNREACHABLE)
16688#define UNREACHABLE_RETURN(val) UNREACHABLE
16689#define RUBY_MACRO_SELECT(base,n) TOKEN_PASTE(base, n)
16690#define _STDARG_H
16691#define _ANSI_STDARG_H_
16692#undef __need___va_list
16693#define va_start(v,l) __builtin_va_start(v,l)
16694#define va_end(v) __builtin_va_end(v)
16695#define va_arg(v,l) __builtin_va_arg(v,l)
16696#define va_copy(d,s) __builtin_va_copy(d,s)
16697#define __va_copy(d,s) __builtin_va_copy(d,s)
16698#define _VA_LIST_
16699#define _VA_LIST
16700#define _VA_LIST_T_H
16701#define __va_list__
16702#pragma GCC visibility push(default)
16703#define SIGNED_VALUE long
16704#define SIZEOF_VALUE SIZEOF_LONG
16705#define PRI_VALUE_PREFIX "l"
16706#define PRI_INT_PREFIX ""
16707#define PRI_LONG_PREFIX "l"
16708#define PRI_SHORT_PREFIX "h"
16709#define PRI_64_PREFIX PRI_LONG_PREFIX
16710#define RUBY_PRI_VALUE_MARK "\v"
16711#define PRIdVALUE PRI_VALUE_PREFIX"d"
16712#define PRIoVALUE PRI_VALUE_PREFIX"o"
16713#define PRIuVALUE PRI_VALUE_PREFIX"u"
16714#define PRIxVALUE PRI_VALUE_PREFIX"x"
16715#define PRIXVALUE PRI_VALUE_PREFIX"X"
16716#define PRIsVALUE PRI_VALUE_PREFIX"i" RUBY_PRI_VALUE_MARK
16717#define PRIdPTRDIFF PRI_PTRDIFF_PREFIX"d"
16718#define PRIiPTRDIFF PRI_PTRDIFF_PREFIX"i"
16719#define PRIoPTRDIFF PRI_PTRDIFF_PREFIX"o"
16720#define PRIuPTRDIFF PRI_PTRDIFF_PREFIX"u"
16721#define PRIxPTRDIFF PRI_PTRDIFF_PREFIX"x"
16722#define PRIXPTRDIFF PRI_PTRDIFF_PREFIX"X"
16723#define PRIdSIZE PRI_SIZE_PREFIX"d"
16724#define PRIiSIZE PRI_SIZE_PREFIX"i"
16725#define PRIoSIZE PRI_SIZE_PREFIX"o"
16726#define PRIuSIZE PRI_SIZE_PREFIX"u"
16727#define PRIxSIZE PRI_SIZE_PREFIX"x"
16728#define PRIXSIZE PRI_SIZE_PREFIX"X"
16729#define _GCC_LIMITS_H_
16730#define _GCC_NEXT_LIMITS_H
16731#define _LIBC_LIMITS_H_ 1
16732#define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
16733#undef __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
16734#undef __GLIBC_USE_LIB_EXT2
16735#define __GLIBC_USE_LIB_EXT2 1
16736#undef __GLIBC_USE_IEC_60559_BFP_EXT
16737#define __GLIBC_USE_IEC_60559_BFP_EXT 1
16738#undef __GLIBC_USE_IEC_60559_BFP_EXT_C2X
16739#define __GLIBC_USE_IEC_60559_BFP_EXT_C2X 1
16740#undef __GLIBC_USE_IEC_60559_FUNCS_EXT
16741#define __GLIBC_USE_IEC_60559_FUNCS_EXT 1
16742#undef __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X
16743#define __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X 1
16744#undef __GLIBC_USE_IEC_60559_TYPES_EXT
16745#define __GLIBC_USE_IEC_60559_TYPES_EXT 1
16746#define MB_LEN_MAX 16
16747#define LLONG_MIN (-LLONG_MAX-1)
16748#define LLONG_MAX __LONG_LONG_MAX__
16749#define ULLONG_MAX (LLONG_MAX * 2ULL + 1)
16750#define CHAR_WIDTH 8
16751#define SCHAR_WIDTH 8
16752#define UCHAR_WIDTH 8
16753#define SHRT_WIDTH 16
16754#define USHRT_WIDTH 16
16755#define INT_WIDTH 32
16756#define UINT_WIDTH 32
16757#define LONG_WIDTH __WORDSIZE
16758#define ULONG_WIDTH __WORDSIZE
16759#define LLONG_WIDTH 64
16760#define ULLONG_WIDTH 64
16761#define _BITS_POSIX1_LIM_H 1
16762#define __WORDSIZE 64
16763#define __WORDSIZE_TIME64_COMPAT32 1
16764#define __SYSCALL_WORDSIZE 64
16765#define _POSIX_AIO_LISTIO_MAX 2
16766#define _POSIX_AIO_MAX 1
16767#define _POSIX_ARG_MAX 4096
16768#define _POSIX_CHILD_MAX 25
16769#define _POSIX_DELAYTIMER_MAX 32
16770#define _POSIX_HOST_NAME_MAX 255
16771#define _POSIX_LINK_MAX 8
16772#define _POSIX_LOGIN_NAME_MAX 9
16773#define _POSIX_MAX_CANON 255
16774#define _POSIX_MAX_INPUT 255
16775#define _POSIX_MQ_OPEN_MAX 8
16776#define _POSIX_MQ_PRIO_MAX 32
16777#define _POSIX_NAME_MAX 14
16778#define _POSIX_NGROUPS_MAX 8
16779#define _POSIX_OPEN_MAX 20
16780#define _POSIX_FD_SETSIZE _POSIX_OPEN_MAX
16781#define _POSIX_PATH_MAX 256
16782#define _POSIX_PIPE_BUF 512
16783#define _POSIX_RE_DUP_MAX 255
16784#define _POSIX_RTSIG_MAX 8
16785#define _POSIX_SEM_NSEMS_MAX 256
16786#define _POSIX_SEM_VALUE_MAX 32767
16787#define _POSIX_SIGQUEUE_MAX 32
16788#define _POSIX_SSIZE_MAX 32767
16789#define _POSIX_STREAM_MAX 8
16790#define _POSIX_SYMLINK_MAX 255
16791#define _POSIX_SYMLOOP_MAX 8
16792#define _POSIX_TIMER_MAX 32
16793#define _POSIX_TTY_NAME_MAX 9
16794#define _POSIX_TZNAME_MAX 6
16795#define _POSIX_QLIMIT 1
16796#define _POSIX_HIWAT _POSIX_PIPE_BUF
16797#define _POSIX_UIO_MAXIOV 16
16798#define _POSIX_CLOCKRES_MIN 20000000
16799#define __undef_NR_OPEN
16800#define __undef_LINK_MAX
16801#define __undef_OPEN_MAX
16802#define __undef_ARG_MAX
16803#define _LINUX_LIMITS_H
16804#define NR_OPEN 1024
16805#define NGROUPS_MAX 65536
16806#define ARG_MAX 131072
16807#define LINK_MAX 127
16808#define MAX_CANON 255
16809#define MAX_INPUT 255
16810#define NAME_MAX 255
16811#define PATH_MAX 4096
16812#define PIPE_BUF 4096
16813#define XATTR_NAME_MAX 255
16814#define XATTR_SIZE_MAX 65536
16815#define XATTR_LIST_MAX 65536
16816#define RTSIG_MAX 32
16817#undef NR_OPEN
16818#undef __undef_NR_OPEN
16819#undef LINK_MAX
16820#undef __undef_LINK_MAX
16821#undef OPEN_MAX
16822#undef __undef_OPEN_MAX
16823#undef ARG_MAX
16824#undef __undef_ARG_MAX
16825#define _POSIX_THREAD_KEYS_MAX 128
16826#define PTHREAD_KEYS_MAX 1024
16827#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
16828#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
16829#define _POSIX_THREAD_THREADS_MAX 64
16830#undef PTHREAD_THREADS_MAX
16831#define AIO_PRIO_DELTA_MAX 20
16832#define PTHREAD_STACK_MIN 16384
16833#define DELAYTIMER_MAX 2147483647
16834#define TTY_NAME_MAX 32
16835#define LOGIN_NAME_MAX 256
16836#define HOST_NAME_MAX 64
16837#define MQ_PRIO_MAX 32768
16838#define SEM_VALUE_MAX (2147483647)
16839#define SSIZE_MAX LONG_MAX
16840#define _BITS_POSIX2_LIM_H 1
16841#define _POSIX2_BC_BASE_MAX 99
16842#define _POSIX2_BC_DIM_MAX 2048
16843#define _POSIX2_BC_SCALE_MAX 99
16844#define _POSIX2_BC_STRING_MAX 1000
16845#define _POSIX2_COLL_WEIGHTS_MAX 2
16846#define _POSIX2_EXPR_NEST_MAX 32
16847#define _POSIX2_LINE_MAX 2048
16848#define _POSIX2_RE_DUP_MAX 255
16849#define _POSIX2_CHARCLASS_NAME_MAX 14
16850#define BC_BASE_MAX _POSIX2_BC_BASE_MAX
16851#define BC_DIM_MAX _POSIX2_BC_DIM_MAX
16852#define BC_SCALE_MAX _POSIX2_BC_SCALE_MAX
16853#define BC_STRING_MAX _POSIX2_BC_STRING_MAX
16854#define COLL_WEIGHTS_MAX 255
16855#define EXPR_NEST_MAX _POSIX2_EXPR_NEST_MAX
16856#define LINE_MAX _POSIX2_LINE_MAX
16857#define CHARCLASS_NAME_MAX 2048
16858#define RE_DUP_MAX (0x7fff)
16859#define _XOPEN_LIM_H 1
16860#define _XOPEN_IOV_MAX _POSIX_UIO_MAXIOV
16861#define _BITS_UIO_LIM_H 1
16862#define __IOV_MAX 1024
16863#define IOV_MAX __IOV_MAX
16864#define NL_ARGMAX _POSIX_ARG_MAX
16865#define NL_LANGMAX _POSIX2_LINE_MAX
16866#define NL_MSGMAX INT_MAX
16867#define NL_NMAX INT_MAX
16868#define NL_SETMAX INT_MAX
16869#define NL_TEXTMAX INT_MAX
16870#define NZERO 20
16871#define WORD_BIT 32
16872#define LONG_BIT 64
16873#undef _GCC_NEXT_LIMITS_H
16874#define _LIMITS_H___
16875#undef CHAR_BIT
16876#define CHAR_BIT __CHAR_BIT__
16877#undef SCHAR_MIN
16878#define SCHAR_MIN (-SCHAR_MAX - 1)
16879#undef SCHAR_MAX
16880#define SCHAR_MAX __SCHAR_MAX__
16881#undef UCHAR_MAX
16882#define UCHAR_MAX (SCHAR_MAX * 2 + 1)
16883#undef CHAR_MIN
16884#define CHAR_MIN SCHAR_MIN
16885#undef CHAR_MAX
16886#define CHAR_MAX SCHAR_MAX
16887#undef SHRT_MIN
16888#define SHRT_MIN (-SHRT_MAX - 1)
16889#undef SHRT_MAX
16890#define SHRT_MAX __SHRT_MAX__
16891#undef USHRT_MAX
16892#define USHRT_MAX (SHRT_MAX * 2 + 1)
16893#undef INT_MIN
16894#define INT_MIN (-INT_MAX - 1)
16895#undef INT_MAX
16896#define INT_MAX __INT_MAX__
16897#undef UINT_MAX
16898#define UINT_MAX (INT_MAX * 2U + 1U)
16899#undef LONG_MIN
16900#define LONG_MIN (-LONG_MAX - 1L)
16901#undef LONG_MAX
16902#define LONG_MAX __LONG_MAX__
16903#undef ULONG_MAX
16904#define ULONG_MAX (LONG_MAX * 2UL + 1UL)
16905#undef LLONG_MIN
16906#define LLONG_MIN (-LLONG_MAX - 1LL)
16907#undef LLONG_MAX
16908#define LLONG_MAX __LONG_LONG_MAX__
16909#undef ULLONG_MAX
16910#define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
16911#undef LONG_LONG_MIN
16912#define LONG_LONG_MIN (-LONG_LONG_MAX - 1LL)
16913#undef LONG_LONG_MAX
16914#define LONG_LONG_MAX __LONG_LONG_MAX__
16915#undef ULONG_LONG_MAX
16916#define ULONG_LONG_MAX (LONG_LONG_MAX * 2ULL + 1ULL)
16917#define RUBY_FIXNUM_MAX (LONG_MAX>>1)
16918#define RUBY_FIXNUM_MIN RSHIFT((long)LONG_MIN,1)
16919#define FIXNUM_MAX RUBY_FIXNUM_MAX
16920#define FIXNUM_MIN RUBY_FIXNUM_MIN
16921#define RB_INT2FIX(i) (((VALUE)(i))<<1 | RUBY_FIXNUM_FLAG)
16922#define INT2FIX(i) RB_INT2FIX(i)
16923#define RB_LONG2FIX(i) RB_INT2FIX(i)
16924#define LONG2FIX(i) RB_INT2FIX(i)
16925#define rb_fix_new(v) RB_INT2FIX(v)
16926#define rb_int_new(v) rb_int2inum(v)
16927#define rb_uint_new(v) rb_uint2inum(v)
16928#define LL2NUM(v) rb_ll2inum(v)
16929#define ULL2NUM(v) rb_ull2inum(v)
16930#define SIZET2NUM(v) ULONG2NUM(v)
16931#define SSIZET2NUM(v) LONG2NUM(v)
16932#define rb_long2int(n) rb_long2int_inline(n)
16933#define RB_FIX2LONG(x) ((long)RSHIFT((SIGNED_VALUE)(x),1))
16934#define RB_FIX2ULONG(x) ((unsigned long)RB_FIX2LONG(x))
16935#define RB_FIXNUM_P(f) (((int)(SIGNED_VALUE)(f))&RUBY_FIXNUM_FLAG)
16936#define RB_POSFIXABLE(f) ((f) < RUBY_FIXNUM_MAX+1)
16937#define RB_NEGFIXABLE(f) ((f) >= RUBY_FIXNUM_MIN)
16938#define RB_FIXABLE(f) (RB_POSFIXABLE(f) && RB_NEGFIXABLE(f))
16939#define FIX2LONG(x) RB_FIX2LONG(x)
16940#define FIX2ULONG(x) RB_FIX2ULONG(x)
16941#define FIXNUM_P(f) RB_FIXNUM_P(f)
16942#define POSFIXABLE(f) RB_POSFIXABLE(f)
16943#define NEGFIXABLE(f) RB_NEGFIXABLE(f)
16944#define FIXABLE(f) RB_FIXABLE(f)
16945#define RB_IMMEDIATE_P(x) ((VALUE)(x) & RUBY_IMMEDIATE_MASK)
16946#define IMMEDIATE_P(x) RB_IMMEDIATE_P(x)
16947#define RB_STATIC_SYM_P(x) (((VALUE)(x)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)
16948#define RB_DYNAMIC_SYM_P(x) (!RB_SPECIAL_CONST_P(x) && RB_BUILTIN_TYPE(x) == (RUBY_T_SYMBOL))
16949#define RB_SYMBOL_P(x) (RB_STATIC_SYM_P(x)||RB_DYNAMIC_SYM_P(x))
16950#define RB_ID2SYM(x) (rb_id2sym(x))
16951#define RB_SYM2ID(x) (rb_sym2id(x))
16952#define STATIC_SYM_P(x) RB_STATIC_SYM_P(x)
16953#define DYNAMIC_SYM_P(x) RB_DYNAMIC_SYM_P(x)
16954#define SYMBOL_P(x) RB_SYMBOL_P(x)
16955#define ID2SYM(x) RB_ID2SYM(x)
16956#define SYM2ID(x) RB_SYM2ID(x)
16957#define USE_FLONUM 1
16958#define RB_FLONUM_P(x) ((((int)(SIGNED_VALUE)(x))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG)
16959#define FLONUM_P(x) RB_FLONUM_P(x)
16960#define USE_SYMBOL_AS_METHOD_NAME 1
16961#define RUBY_Qfalse ((VALUE)RUBY_Qfalse)
16962#define RUBY_Qtrue ((VALUE)RUBY_Qtrue)
16963#define RUBY_Qnil ((VALUE)RUBY_Qnil)
16964#define RUBY_Qundef ((VALUE)RUBY_Qundef)
16965#define Qfalse RUBY_Qfalse
16966#define Qtrue RUBY_Qtrue
16967#define Qnil RUBY_Qnil
16968#define Qundef RUBY_Qundef
16969#define IMMEDIATE_MASK RUBY_IMMEDIATE_MASK
16970#define FIXNUM_FLAG RUBY_FIXNUM_FLAG
16971#define FLONUM_MASK RUBY_FLONUM_MASK
16972#define FLONUM_FLAG RUBY_FLONUM_FLAG
16973#define SYMBOL_FLAG RUBY_SYMBOL_FLAG
16974#define RB_TEST(v) !(((VALUE)(v) & (VALUE)~RUBY_Qnil) == 0)
16975#define RB_NIL_P(v) !((VALUE)(v) != RUBY_Qnil)
16976#define RTEST(v) RB_TEST(v)
16977#define NIL_P(v) RB_NIL_P(v)
16978#define CLASS_OF(v) rb_class_of((VALUE)(v))
16979#define T_NONE RUBY_T_NONE
16980#define T_NIL RUBY_T_NIL
16981#define T_OBJECT RUBY_T_OBJECT
16982#define T_CLASS RUBY_T_CLASS
16983#define T_ICLASS RUBY_T_ICLASS
16984#define T_MODULE RUBY_T_MODULE
16985#define T_FLOAT RUBY_T_FLOAT
16986#define T_STRING RUBY_T_STRING
16987#define T_REGEXP RUBY_T_REGEXP
16988#define T_ARRAY RUBY_T_ARRAY
16989#define T_HASH RUBY_T_HASH
16990#define T_STRUCT RUBY_T_STRUCT
16991#define T_BIGNUM RUBY_T_BIGNUM
16992#define T_FILE RUBY_T_FILE
16993#define T_FIXNUM RUBY_T_FIXNUM
16994#define T_TRUE RUBY_T_TRUE
16995#define T_FALSE RUBY_T_FALSE
16996#define T_DATA RUBY_T_DATA
16997#define T_MATCH RUBY_T_MATCH
16998#define T_SYMBOL RUBY_T_SYMBOL
16999#define T_RATIONAL RUBY_T_RATIONAL
17000#define T_COMPLEX RUBY_T_COMPLEX
17001#define T_IMEMO RUBY_T_IMEMO
17002#define T_UNDEF RUBY_T_UNDEF
17003#define T_NODE RUBY_T_NODE
17004#define T_ZOMBIE RUBY_T_ZOMBIE
17005#define T_MASK RUBY_T_MASK
17006#define RB_BUILTIN_TYPE(x) (int)(((struct RBasic*)(x))->flags & RUBY_T_MASK)
17007#define BUILTIN_TYPE(x) RB_BUILTIN_TYPE(x)
17008#define TYPE(x) rb_type((VALUE)(x))
17009#define RB_FLOAT_TYPE_P(obj) ( RB_FLONUM_P(obj) || (!RB_SPECIAL_CONST_P(obj) && RB_BUILTIN_TYPE(obj) == RUBY_T_FLOAT))
17010#define RB_TYPE_P(obj,type) ( ((type) == RUBY_T_FIXNUM) ? RB_FIXNUM_P(obj) : ((type) == RUBY_T_TRUE) ? ((obj) == RUBY_Qtrue) : ((type) == RUBY_T_FALSE) ? ((obj) == RUBY_Qfalse) : ((type) == RUBY_T_NIL) ? ((obj) == RUBY_Qnil) : ((type) == RUBY_T_UNDEF) ? ((obj) == RUBY_Qundef) : ((type) == RUBY_T_SYMBOL) ? RB_SYMBOL_P(obj) : ((type) == RUBY_T_FLOAT) ? RB_FLOAT_TYPE_P(obj) : (!RB_SPECIAL_CONST_P(obj) && RB_BUILTIN_TYPE(obj) == (type)))
17011#define RB_GC_GUARD(v) (*__extension__ ({ volatile VALUE *rb_gc_guarded_ptr = &(v); __asm__("" : : "m"(rb_gc_guarded_ptr)); rb_gc_guarded_ptr; }))
17012#define RB_UNUSED_VAR(x) x __attribute__ ((unused))
17013#define Check_Type(v,t) rb_check_type((VALUE)(v),(t))
17014#define StringValue(v) rb_string_value(&(v))
17015#define StringValuePtr(v) rb_string_value_ptr(&(v))
17016#define StringValueCStr(v) rb_string_value_cstr(&(v))
17017#define SafeStringValue(v) do { StringValue(v); rb_check_safe_obj(v);} while (0)
17018#define Check_SafeStr(v) rb_check_safe_str((VALUE)(v))
17019#define ExportStringValue(v) do { SafeStringValue(v); (v) = rb_str_export(v);} while (0)
17020#define FilePathValue(v) (RB_GC_GUARD(v) = rb_get_path(v))
17021#define FilePathStringValue(v) ((v) = rb_get_path_no_checksafe(v))
17022#define RUBY_SAFE_LEVEL_MAX 1
17023#define ruby_safe_level_2_warning() ruby_safe_level_2_error()
17024#define RUBY_SAFE_LEVEL_INVALID_P(level) __extension__( __builtin_choose_expr( __builtin_constant_p(level), ((level) < 0 || RUBY_SAFE_LEVEL_MAX < (level)), 0))
17025#define RUBY_SAFE_LEVEL_CHECK(level,type) __extension__(__builtin_choose_expr(RUBY_SAFE_LEVEL_INVALID_P(level), ruby_safe_level_2_ ##type(), (level)))
17026#define rb_secure(level) rb_secure(RUBY_SAFE_LEVEL_CHECK(level, warning))
17027#define rb_set_safe_level(level) rb_set_safe_level(RUBY_SAFE_LEVEL_CHECK(level, error))
17028#define RB_NUM2LONG(x) rb_num2long_inline(x)
17029#define NUM2LONG(x) RB_NUM2LONG(x)
17030#define RB_NUM2ULONG(x) rb_num2ulong_inline(x)
17031#define NUM2ULONG(x) RB_NUM2ULONG(x)
17032#define RB_FIX2INT(x) ((int)rb_fix2int((VALUE)(x)))
17033#define RB_NUM2INT(x) rb_num2int_inline(x)
17034#define RB_NUM2UINT(x) ((unsigned int)rb_num2uint(x))
17035#define RB_FIX2UINT(x) ((unsigned int)rb_fix2uint(x))
17036#define NUM2INT(x) RB_NUM2INT(x)
17037#define NUM2UINT(x) RB_NUM2UINT(x)
17038#define FIX2INT(x) RB_FIX2INT(x)
17039#define FIX2UINT(x) RB_FIX2UINT(x)
17040#define RB_FIX2SHORT(x) (rb_fix2short((VALUE)(x)))
17041#define FIX2SHORT(x) RB_FIX2SHORT(x)
17042#define RB_NUM2SHORT(x) rb_num2short_inline(x)
17043#define RB_NUM2USHORT(x) rb_num2ushort(x)
17044#define NUM2SHORT(x) RB_NUM2SHORT(x)
17045#define NUM2USHORT(x) RB_NUM2USHORT(x)
17046#define RB_NUM2LL(x) rb_num2ll_inline(x)
17047#define RB_NUM2ULL(x) rb_num2ull(x)
17048#define NUM2LL(x) RB_NUM2LL(x)
17049#define NUM2ULL(x) RB_NUM2ULL(x)
17050#define NUM2SIZET(x) NUM2ULONG(x)
17051#define NUM2SSIZET(x) NUM2LONG(x)
17052#define NUM2DBL(x) rb_num2dbl((VALUE)(x))
17053#define RB_NEWOBJ(obj,type) type *(obj) = (type*)rb_newobj()
17054#define RB_NEWOBJ_OF(obj,type,klass,flags) type *(obj) = (type*)rb_newobj_of(klass, flags)
17055#define NEWOBJ(obj,type) RB_NEWOBJ(obj,type)
17056#define NEWOBJ_OF(obj,type,klass,flags) RB_NEWOBJ_OF(obj,type,klass,flags)
17057#define OBJSETUP(obj,c,t) rb_obj_setup(obj, c, t)
17058#define CLONESETUP(clone,obj) rb_clone_setup(clone,obj)
17059#define DUPSETUP(dup,obj) rb_dup_setup(dup,obj)
17060#define USE_RGENGC 1
17061#define USE_RINCGC 1
17062#define RGENGC_WB_PROTECTED_ARRAY 1
17063#define RGENGC_WB_PROTECTED_HASH 1
17064#define RGENGC_WB_PROTECTED_STRUCT 1
17065#define RGENGC_WB_PROTECTED_STRING 1
17066#define RGENGC_WB_PROTECTED_OBJECT 1
17067#define RGENGC_WB_PROTECTED_REGEXP 1
17068#define RGENGC_WB_PROTECTED_CLASS 1
17069#define RGENGC_WB_PROTECTED_FLOAT 1
17070#define RGENGC_WB_PROTECTED_COMPLEX 1
17071#define RGENGC_WB_PROTECTED_RATIONAL 1
17072#define RGENGC_WB_PROTECTED_BIGNUM 1
17073#define RGENGC_WB_PROTECTED_NODE_CREF 1
17074#define RUBY_FL_USER_N(n) RUBY_FL_USER ##n = (1<<(RUBY_FL_USHIFT+n))
17075#define RB_OBJ_WB_UNPROTECT_FOR(type,obj) __extension__( __builtin_choose_expr( RGENGC_WB_PROTECTED_ ##type, OBJ_WB_UNPROTECT((VALUE)(obj)), ((VALUE)(obj))))
17076#define RBASIC_CLASS(obj) (RBASIC(obj)->klass)
17077#define ROBJECT_EMBED_LEN_MAX ROBJECT_EMBED_LEN_MAX
17078#define ROBJECT_EMBED ROBJECT_EMBED
17079#define ROBJECT_NUMIV(o) ((RBASIC(o)->flags & ROBJECT_EMBED) ? ROBJECT_EMBED_LEN_MAX : ROBJECT(o)->as.heap.numiv)
17080#define ROBJECT_IVPTR(o) ((RBASIC(o)->flags & ROBJECT_EMBED) ? ROBJECT(o)->as.ary : ROBJECT(o)->as.heap.ivptr)
17081#define ROBJECT_IV_INDEX_TBL(o) ((RBASIC(o)->flags & ROBJECT_EMBED) ? RCLASS_IV_INDEX_TBL(rb_obj_class(o)) : ROBJECT(o)->as.heap.iv_index_tbl)
17082#define RCLASS_SUPER(c) rb_class_get_superclass(c)
17083#define RMODULE_IV_TBL(m) RCLASS_IV_TBL(m)
17084#define RMODULE_CONST_TBL(m) RCLASS_CONST_TBL(m)
17085#define RMODULE_M_TBL(m) RCLASS_M_TBL(m)
17086#define RMODULE_SUPER(m) RCLASS_SUPER(m)
17087#define RMODULE_IS_OVERLAID RMODULE_IS_OVERLAID
17088#define RMODULE_IS_REFINEMENT RMODULE_IS_REFINEMENT
17089#define RMODULE_INCLUDED_INTO_REFINEMENT RMODULE_INCLUDED_INTO_REFINEMENT
17090#define RFLOAT_VALUE(v) rb_float_value(v)
17091#define DBL2NUM(dbl) rb_float_new(dbl)
17092#define RUBY_ELTS_SHARED RUBY_ELTS_SHARED
17093#define ELTS_SHARED RUBY_ELTS_SHARED
17094#define RSTRING_NOEMBED RSTRING_NOEMBED
17095#define RSTRING_EMBED_LEN_MASK RSTRING_EMBED_LEN_MASK
17096#define RSTRING_EMBED_LEN_SHIFT RSTRING_EMBED_LEN_SHIFT
17097#define RSTRING_EMBED_LEN_MAX RSTRING_EMBED_LEN_MAX
17098#define RSTRING_FSTR RSTRING_FSTR
17099#define RSTRING_EMBED_LEN(str) (long)((RBASIC(str)->flags >> RSTRING_EMBED_LEN_SHIFT) & (RSTRING_EMBED_LEN_MASK >> RSTRING_EMBED_LEN_SHIFT))
17100#define RSTRING_LEN(str) (!(RBASIC(str)->flags & RSTRING_NOEMBED) ? RSTRING_EMBED_LEN(str) : RSTRING(str)->as.heap.len)
17101#define RSTRING_PTR(str) (!(RBASIC(str)->flags & RSTRING_NOEMBED) ? RSTRING(str)->as.ary : RSTRING(str)->as.heap.ptr)
17102#define RSTRING_END(str) (!(RBASIC(str)->flags & RSTRING_NOEMBED) ? (RSTRING(str)->as.ary + RSTRING_EMBED_LEN(str)) : (RSTRING(str)->as.heap.ptr + RSTRING(str)->as.heap.len))
17103#define RSTRING_LENINT(str) rb_long2int(RSTRING_LEN(str))
17104#define RSTRING_GETMEM(str,ptrvar,lenvar) (!(RBASIC(str)->flags & RSTRING_NOEMBED) ? ((ptrvar) = RSTRING(str)->as.ary, (lenvar) = RSTRING_EMBED_LEN(str)) : ((ptrvar) = RSTRING(str)->as.heap.ptr, (lenvar) = RSTRING(str)->as.heap.len))
17105#define USE_TRANSIENT_HEAP 1
17106#define RARRAY_TRANSIENT_FLAG RARRAY_TRANSIENT_FLAG
17107#define RARRAY_EMBED_FLAG (VALUE)RARRAY_EMBED_FLAG
17108#define RARRAY_EMBED_LEN_MASK (VALUE)RARRAY_EMBED_LEN_MASK
17109#define RARRAY_EMBED_LEN_MAX RARRAY_EMBED_LEN_MAX
17110#define RARRAY_EMBED_LEN_SHIFT RARRAY_EMBED_LEN_SHIFT
17111#define RARRAY_EMBED_LEN(a) (long)((RBASIC(a)->flags >> RARRAY_EMBED_LEN_SHIFT) & (RARRAY_EMBED_LEN_MASK >> RARRAY_EMBED_LEN_SHIFT))
17112#define RARRAY_LEN(a) rb_array_len(a)
17113#define RARRAY_LENINT(ary) rb_long2int(RARRAY_LEN(ary))
17114#define RARRAY_CONST_PTR(a) rb_array_const_ptr(a)
17115#define RARRAY_CONST_PTR_TRANSIENT(a) rb_array_const_ptr_transient(a)
17116#define RARRAY_TRANSIENT_P(ary) FL_TEST_RAW((ary), RARRAY_TRANSIENT_FLAG)
17117#define RARRAY_PTR_USE_START_TRANSIENT(a) rb_array_ptr_use_start(a, 1)
17118#define RARRAY_PTR_USE_END_TRANSIENT(a) rb_array_ptr_use_end(a, 1)
17119#define RARRAY_PTR_USE_TRANSIENT(ary,ptr_name,expr) do { const VALUE _ary = (ary); VALUE *ptr_name = (VALUE *)RARRAY_PTR_USE_START_TRANSIENT(_ary); expr; RARRAY_PTR_USE_END_TRANSIENT(_ary); } while (0)
17120#define RARRAY_PTR_USE_START(a) rb_array_ptr_use_start(a, 0)
17121#define RARRAY_PTR_USE_END(a) rb_array_ptr_use_end(a, 0)
17122#define RARRAY_PTR_USE(ary,ptr_name,expr) do { const VALUE _ary = (ary); VALUE *ptr_name = (VALUE *)RARRAY_PTR_USE_START(_ary); expr; RARRAY_PTR_USE_END(_ary); } while (0)
17123#define RARRAY_AREF(a,i) (RARRAY_CONST_PTR_TRANSIENT(a)[i])
17124#define RARRAY_ASET(a,i,v) do { const VALUE _ary = (a); const VALUE _v = (v); VALUE *ptr = (VALUE *)RARRAY_PTR_USE_START_TRANSIENT(_ary); RB_OBJ_WRITE(_ary, &ptr[i], _v); RARRAY_PTR_USE_END_TRANSIENT(_ary); } while (0)
17125#define RARRAY_PTR(a) ((VALUE *)RARRAY_CONST_PTR(RB_OBJ_WB_UNPROTECT_FOR(ARRAY, a)))
17126#define RREGEXP_PTR(r) (RREGEXP(r)->ptr)
17127#define RREGEXP_SRC(r) (RREGEXP(r)->src)
17128#define RREGEXP_SRC_PTR(r) RSTRING_PTR(RREGEXP(r)->src)
17129#define RREGEXP_SRC_LEN(r) RSTRING_LEN(RREGEXP(r)->src)
17130#define RREGEXP_SRC_END(r) RSTRING_END(RREGEXP(r)->src)
17131#define RHASH_TBL(h) rb_hash_tbl(h, __FILE__, __LINE__)
17132#define RHASH_ITER_LEV(h) rb_hash_iter_lev(h)
17133#define RHASH_IFNONE(h) rb_hash_ifnone(h)
17134#define RHASH_SIZE(h) rb_hash_size_num(h)
17135#define RHASH_EMPTY_P(h) (RHASH_SIZE(h) == 0)
17136#define RHASH_SET_IFNONE(h,ifnone) rb_hash_set_ifnone((VALUE)h, ifnone)
17137#define HAVE_TYPE_RB_DATA_TYPE_T 1
17138#define HAVE_RB_DATA_TYPE_T_FUNCTION 1
17139#define HAVE_RB_DATA_TYPE_T_PARENT 1
17140#define DATA_PTR(dta) (RDATA(dta)->data)
17141#define RTYPEDDATA_P(v) (RTYPEDDATA(v)->typed_flag == 1)
17142#define RTYPEDDATA_TYPE(v) (RTYPEDDATA(v)->type)
17143#define RTYPEDDATA_DATA(v) (RTYPEDDATA(v)->data)
17144#define RUBY_UNTYPED_DATA_WARNING 1
17145#define Check_TypedStruct(v,t) rb_check_typeddata((VALUE)(v),(t))
17146#define RUBY_DEFAULT_FREE ((RUBY_DATA_FUNC)-1)
17147#define RUBY_NEVER_FREE ((RUBY_DATA_FUNC)0)
17148#define RUBY_TYPED_DEFAULT_FREE RUBY_DEFAULT_FREE
17149#define RUBY_TYPED_NEVER_FREE RUBY_NEVER_FREE
17150#define RUBY_TYPED_FREE_IMMEDIATELY 1
17151#define RUBY_TYPED_WB_PROTECTED RUBY_FL_WB_PROTECTED
17152#define RUBY_TYPED_PROMOTED1 RUBY_FL_PROMOTED1
17153#define Data_Wrap_Struct(klass,mark,free,sval) rb_data_object_wrap((klass),(sval),(RUBY_DATA_FUNC)(mark),(RUBY_DATA_FUNC)(free))
17154#define Data_Make_Struct0(result,klass,type,size,mark,free,sval) VALUE result = rb_data_object_zalloc((klass), (size), (RUBY_DATA_FUNC)(mark), (RUBY_DATA_FUNC)(free)); (void)((sval) = (type *)DATA_PTR(result));
17155#define Data_Make_Struct(klass,type,mark,free,sval) RB_GNUC_EXTENSION_BLOCK( Data_Make_Struct0(data_struct_obj, klass, type, sizeof(type), mark, free, sval); data_struct_obj )
17156#define TypedData_Wrap_Struct(klass,data_type,sval) rb_data_typed_object_wrap((klass),(sval),(data_type))
17157#define TypedData_Make_Struct0(result,klass,type,size,data_type,sval) VALUE result = rb_data_typed_object_zalloc(klass, size, data_type); (void)((sval) = (type *)DATA_PTR(result));
17158#define TypedData_Make_Struct(klass,type,data_type,sval) RB_GNUC_EXTENSION_BLOCK( TypedData_Make_Struct0(data_struct_obj, klass, type, sizeof(type), data_type, sval); data_struct_obj )
17159#define Data_Get_Struct(obj,type,sval) ((sval) = (type*)rb_data_object_get(obj))
17160#define TypedData_Get_Struct(obj,type,data_type,sval) ((sval) = (type*)rb_check_typeddata((obj), (data_type)))
17161#define RSTRUCT_LEN(st) NUM2LONG(rb_struct_size(st))
17162#define RSTRUCT_PTR(st) rb_struct_ptr(st)
17163#define RSTRUCT_SET(st,idx,v) rb_struct_aset(st, INT2NUM(idx), (v))
17164#define RSTRUCT_GET(st,idx) rb_struct_aref(st, INT2NUM(idx))
17165#define RBIGNUM_SIGN(b) (rb_big_sign(b))
17166#define RBIGNUM_POSITIVE_P(b) (RBIGNUM_SIGN(b)!=0)
17167#define RBIGNUM_NEGATIVE_P(b) (RBIGNUM_SIGN(b)==0)
17168#define R_CAST(st) (struct st*)
17169#define RBASIC(obj) (R_CAST(RBasic)(obj))
17170#define ROBJECT(obj) (R_CAST(RObject)(obj))
17171#define RCLASS(obj) (R_CAST(RClass)(obj))
17172#define RMODULE(obj) RCLASS(obj)
17173#define RSTRING(obj) (R_CAST(RString)(obj))
17174#define RREGEXP(obj) (R_CAST(RRegexp)(obj))
17175#define RARRAY(obj) (R_CAST(RArray)(obj))
17176#define RDATA(obj) (R_CAST(RData)(obj))
17177#define RTYPEDDATA(obj) (R_CAST(RTypedData)(obj))
17178#define RFILE(obj) (R_CAST(RFile)(obj))
17179#define FL_SINGLETON ((VALUE)RUBY_FL_SINGLETON)
17180#define FL_WB_PROTECTED ((VALUE)RUBY_FL_WB_PROTECTED)
17181#define FL_PROMOTED0 ((VALUE)RUBY_FL_PROMOTED0)
17182#define FL_PROMOTED1 ((VALUE)RUBY_FL_PROMOTED1)
17183#define FL_FINALIZE ((VALUE)RUBY_FL_FINALIZE)
17184#define FL_TAINT ((VALUE)RUBY_FL_TAINT)
17185#define FL_UNTRUSTED ((VALUE)RUBY_FL_UNTRUSTED)
17186#define FL_EXIVAR ((VALUE)RUBY_FL_EXIVAR)
17187#define FL_FREEZE ((VALUE)RUBY_FL_FREEZE)
17188#define FL_USHIFT ((VALUE)RUBY_FL_USHIFT)
17189#define FL_USER0 ((VALUE)RUBY_FL_USER0)
17190#define FL_USER1 ((VALUE)RUBY_FL_USER1)
17191#define FL_USER2 ((VALUE)RUBY_FL_USER2)
17192#define FL_USER3 ((VALUE)RUBY_FL_USER3)
17193#define FL_USER4 ((VALUE)RUBY_FL_USER4)
17194#define FL_USER5 ((VALUE)RUBY_FL_USER5)
17195#define FL_USER6 ((VALUE)RUBY_FL_USER6)
17196#define FL_USER7 ((VALUE)RUBY_FL_USER7)
17197#define FL_USER8 ((VALUE)RUBY_FL_USER8)
17198#define FL_USER9 ((VALUE)RUBY_FL_USER9)
17199#define FL_USER10 ((VALUE)RUBY_FL_USER10)
17200#define FL_USER11 ((VALUE)RUBY_FL_USER11)
17201#define FL_USER12 ((VALUE)RUBY_FL_USER12)
17202#define FL_USER13 ((VALUE)RUBY_FL_USER13)
17203#define FL_USER14 ((VALUE)RUBY_FL_USER14)
17204#define FL_USER15 ((VALUE)RUBY_FL_USER15)
17205#define FL_USER16 ((VALUE)RUBY_FL_USER16)
17206#define FL_USER17 ((VALUE)RUBY_FL_USER17)
17207#define FL_USER18 ((VALUE)RUBY_FL_USER18)
17208#define FL_USER19 ((VALUE)RUBY_FL_USER19)
17209#define RB_SPECIAL_CONST_P(x) (RB_IMMEDIATE_P(x) || !RB_TEST(x))
17210#define SPECIAL_CONST_P(x) RB_SPECIAL_CONST_P(x)
17211#define RB_FL_ABLE(x) (!RB_SPECIAL_CONST_P(x) && RB_BUILTIN_TYPE(x) != RUBY_T_NODE)
17212#define RB_FL_TEST_RAW(x,f) (RBASIC(x)->flags&(f))
17213#define RB_FL_TEST(x,f) (RB_FL_ABLE(x)?RB_FL_TEST_RAW((x),(f)):0)
17214#define RB_FL_ANY_RAW(x,f) RB_FL_TEST_RAW((x),(f))
17215#define RB_FL_ANY(x,f) RB_FL_TEST((x),(f))
17216#define RB_FL_ALL_RAW(x,f) (RB_FL_TEST_RAW((x),(f)) == (f))
17217#define RB_FL_ALL(x,f) (RB_FL_TEST((x),(f)) == (f))
17218#define RB_FL_SET_RAW(x,f) (void)(RBASIC(x)->flags |= (f))
17219#define RB_FL_SET(x,f) (RB_FL_ABLE(x) ? RB_FL_SET_RAW(x, f) : (void)0)
17220#define RB_FL_UNSET_RAW(x,f) (void)(RBASIC(x)->flags &= ~(VALUE)(f))
17221#define RB_FL_UNSET(x,f) (RB_FL_ABLE(x) ? RB_FL_UNSET_RAW(x, f) : (void)0)
17222#define RB_FL_REVERSE_RAW(x,f) (void)(RBASIC(x)->flags ^= (f))
17223#define RB_FL_REVERSE(x,f) (RB_FL_ABLE(x) ? RB_FL_REVERSE_RAW(x, f) : (void)0)
17224#define RB_OBJ_TAINTABLE(x) (RB_FL_ABLE(x) && RB_BUILTIN_TYPE(x) != RUBY_T_BIGNUM && RB_BUILTIN_TYPE(x) != RUBY_T_FLOAT)
17225#define RB_OBJ_TAINTED_RAW(x) RB_FL_TEST_RAW(x, RUBY_FL_TAINT)
17226#define RB_OBJ_TAINTED(x) (!!RB_FL_TEST((x), RUBY_FL_TAINT))
17227#define RB_OBJ_TAINT_RAW(x) RB_FL_SET_RAW(x, RUBY_FL_TAINT)
17228#define RB_OBJ_TAINT(x) (RB_OBJ_TAINTABLE(x) ? RB_OBJ_TAINT_RAW(x) : (void)0)
17229#define RB_OBJ_UNTRUSTED(x) RB_OBJ_TAINTED(x)
17230#define RB_OBJ_UNTRUST(x) RB_OBJ_TAINT(x)
17231#define RB_OBJ_INFECT_RAW(x,s) RB_FL_SET_RAW(x, RB_OBJ_TAINTED_RAW(s))
17232#define RB_OBJ_INFECT(x,s) ( (RB_OBJ_TAINTABLE(x) && RB_FL_ABLE(s)) ? RB_OBJ_INFECT_RAW(x, s) : (void)0)
17233#define RB_OBJ_FROZEN_RAW(x) (RBASIC(x)->flags&RUBY_FL_FREEZE)
17234#define RB_OBJ_FROZEN(x) (!RB_FL_ABLE(x) || RB_OBJ_FROZEN_RAW(x))
17235#define RB_OBJ_FREEZE_RAW(x) (void)(RBASIC(x)->flags |= RUBY_FL_FREEZE)
17236#define RB_OBJ_FREEZE(x) rb_obj_freeze_inline((VALUE)x)
17237#define FL_ABLE(x) RB_FL_ABLE(x)
17238#define FL_TEST_RAW(x,f) RB_FL_TEST_RAW(x,f)
17239#define FL_TEST(x,f) RB_FL_TEST(x,f)
17240#define FL_ANY_RAW(x,f) RB_FL_ANY_RAW(x,f)
17241#define FL_ANY(x,f) RB_FL_ANY(x,f)
17242#define FL_ALL_RAW(x,f) RB_FL_ALL_RAW(x,f)
17243#define FL_ALL(x,f) RB_FL_ALL(x,f)
17244#define FL_SET_RAW(x,f) RB_FL_SET_RAW(x,f)
17245#define FL_SET(x,f) RB_FL_SET(x,f)
17246#define FL_UNSET_RAW(x,f) RB_FL_UNSET_RAW(x,f)
17247#define FL_UNSET(x,f) RB_FL_UNSET(x,f)
17248#define FL_REVERSE_RAW(x,f) RB_FL_REVERSE_RAW(x,f)
17249#define FL_REVERSE(x,f) RB_FL_REVERSE(x,f)
17250#define OBJ_TAINTABLE(x) RB_OBJ_TAINTABLE(x)
17251#define OBJ_TAINTED_RAW(x) RB_OBJ_TAINTED_RAW(x)
17252#define OBJ_TAINTED(x) RB_OBJ_TAINTED(x)
17253#define OBJ_TAINT_RAW(x) RB_OBJ_TAINT_RAW(x)
17254#define OBJ_TAINT(x) RB_OBJ_TAINT(x)
17255#define OBJ_UNTRUSTED(x) RB_OBJ_UNTRUSTED(x)
17256#define OBJ_UNTRUST(x) RB_OBJ_UNTRUST(x)
17257#define OBJ_INFECT_RAW(x,s) RB_OBJ_INFECT_RAW(x,s)
17258#define OBJ_INFECT(x,s) RB_OBJ_INFECT(x,s)
17259#define OBJ_FROZEN_RAW(x) RB_OBJ_FROZEN_RAW(x)
17260#define OBJ_FROZEN(x) RB_OBJ_FROZEN(x)
17261#define OBJ_FREEZE_RAW(x) RB_OBJ_FREEZE_RAW(x)
17262#define OBJ_FREEZE(x) RB_OBJ_FREEZE(x)
17263#define RUBY_UNTYPED_DATA_FUNC(func) func __attribute__((warning("untyped Data is unsafe; use TypedData instead")))
17264#define rb_data_object_wrap_warning(klass,ptr,mark,free) __extension__( __builtin_choose_expr( __builtin_constant_p(klass) && !(klass), rb_data_object_wrap(klass, ptr, mark, free), rb_data_object_wrap_warning(klass, ptr, mark, free)))
17265#define rb_data_object_wrap_0 rb_data_object_wrap
17266#define rb_data_object_wrap_1 rb_data_object_wrap_warning
17267#define rb_data_object_wrap RUBY_MACRO_SELECT(rb_data_object_wrap_, RUBY_UNTYPED_DATA_WARNING)
17268#define rb_data_object_get_0 rb_data_object_get
17269#define rb_data_object_get_1 rb_data_object_get_warning
17270#define rb_data_object_get RUBY_MACRO_SELECT(rb_data_object_get_, RUBY_UNTYPED_DATA_WARNING)
17271#define rb_data_object_make_0 rb_data_object_make
17272#define rb_data_object_make_1 rb_data_object_make_warning
17273#define rb_data_object_make RUBY_MACRO_SELECT(rb_data_object_make_, RUBY_UNTYPED_DATA_WARNING)
17274#define RB_OBJ_PROMOTED_RAW(x) RB_FL_ALL_RAW(x, RUBY_FL_PROMOTED)
17275#define RB_OBJ_PROMOTED(x) (RB_SPECIAL_CONST_P(x) ? 0 : RB_OBJ_PROMOTED_RAW(x))
17276#define RB_OBJ_WB_UNPROTECT(x) rb_obj_wb_unprotect(x, __FILE__, __LINE__)
17277#define OBJ_PROMOTED_RAW(x) RB_OBJ_PROMOTED_RAW(x)
17278#define OBJ_PROMOTED(x) RB_OBJ_PROMOTED(x)
17279#define OBJ_WB_UNPROTECT(x) RB_OBJ_WB_UNPROTECT(x)
17280#define RB_OBJ_WRITE(a,slot,b) rb_obj_write((VALUE)(a), (VALUE *)(slot), (VALUE)(b), __FILE__, __LINE__)
17281#define RB_OBJ_WRITTEN(a,oldv,b) rb_obj_written((VALUE)(a), (VALUE)(oldv), (VALUE)(b), __FILE__, __LINE__)
17282#define USE_RGENGC_LOGGING_WB_UNPROTECT 0
17283#define RUBY_INTEGER_UNIFICATION 1
17284#define RB_INTEGER_TYPE_P(obj) rb_integer_type_p(obj)
17285#define RB_INT2NUM(v) RB_INT2FIX((int)(v))
17286#define RB_UINT2NUM(v) RB_LONG2FIX((unsigned int)(v))
17287#define INT2NUM(x) RB_INT2NUM(x)
17288#define UINT2NUM(x) RB_UINT2NUM(x)
17289#define RB_LONG2NUM(x) rb_long2num_inline(x)
17290#define RB_ULONG2NUM(x) rb_ulong2num_inline(x)
17291#define RB_NUM2CHR(x) rb_num2char_inline(x)
17292#define RB_CHR2FIX(x) RB_INT2FIX((long)((x)&0xff))
17293#define LONG2NUM(x) RB_LONG2NUM(x)
17294#define ULONG2NUM(x) RB_ULONG2NUM(x)
17295#define USHORT2NUM(x) RB_INT2FIX(x)
17296#define NUM2CHR(x) RB_NUM2CHR(x)
17297#define CHR2FIX(x) RB_CHR2FIX(x)
17298#define RB_ST2FIX(h) RB_LONG2FIX((long)(h))
17299#define ST2FIX(h) RB_ST2FIX(h)
17300#define RB_ALLOC_N(type,n) ((type*)ruby_xmalloc2((size_t)(n),sizeof(type)))
17301#define RB_ALLOC(type) ((type*)ruby_xmalloc(sizeof(type)))
17302#define RB_ZALLOC_N(type,n) ((type*)ruby_xcalloc((size_t)(n),sizeof(type)))
17303#define RB_ZALLOC(type) (RB_ZALLOC_N(type,1))
17304#define RB_REALLOC_N(var,type,n) ((var)=(type*)ruby_xrealloc2((char*)(var),(size_t)(n),sizeof(type)))
17305#define ALLOC_N(type,n) RB_ALLOC_N(type,n)
17306#define ALLOC(type) RB_ALLOC(type)
17307#define ZALLOC_N(type,n) RB_ZALLOC_N(type,n)
17308#define ZALLOC(type) RB_ZALLOC(type)
17309#define REALLOC_N(var,type,n) RB_REALLOC_N(var,type,n)
17310#define ALLOCA_N(type,n) (type*)__builtin_alloca_with_align((sizeof(type)*(n)), RUBY_ALIGNOF(type) * CHAR_BIT)
17311#define DSIZE_T uint128_t
17312#define RUBY_ALLOCV_LIMIT 1024
17313#define RB_ALLOCV(v,n) ((n) < RUBY_ALLOCV_LIMIT ? ((v) = 0, alloca(n)) : rb_alloc_tmp_buffer(&(v), (n)))
17314#define RB_ALLOCV_N(type,v,n) ((type*)(((size_t)(n) < RUBY_ALLOCV_LIMIT / sizeof(type)) ? ((v) = 0, alloca((size_t)(n) * sizeof(type))) : rb_alloc_tmp_buffer2(&(v), (long)(n), sizeof(type))))
17315#define RB_ALLOCV_END(v) rb_free_tmp_buffer(&(v))
17316#define ALLOCV(v,n) RB_ALLOCV(v, n)
17317#define ALLOCV_N(type,v,n) RB_ALLOCV_N(type, v, n)
17318#define ALLOCV_END(v) RB_ALLOCV_END(v)
17319#define MEMZERO(p,type,n) memset((p), 0, sizeof(type)*(size_t)(n))
17320#define MEMCPY(p1,p2,type,n) memcpy((p1), (p2), sizeof(type)*(size_t)(n))
17321#define MEMMOVE(p1,p2,type,n) memmove((p1), (p2), sizeof(type)*(size_t)(n))
17322#define MEMCMP(p1,p2,type,n) memcmp((p1), (p2), sizeof(type)*(size_t)(n))
17323#define RUBY_METHOD_FUNC(func) ((VALUE (*)(ANYARGS))(func))
17324#define RUBY_CONST_ID_CACHE(result,str) { static ID rb_intern_id_cache; if (!rb_intern_id_cache) rb_intern_id_cache = rb_intern2((str), (long)strlen(str)); result rb_intern_id_cache; }
17325#define RUBY_CONST_ID(var,str) do RUBY_CONST_ID_CACHE((var) =, (str)) while (0)
17326#define CONST_ID_CACHE(result,str) RUBY_CONST_ID_CACHE(result, str)
17327#define CONST_ID(var,str) RUBY_CONST_ID(var, str)
17328#define rb_intern(str) (__builtin_constant_p(str) ? __extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : rb_intern(str))
17329#define rb_intern_const(str) (__builtin_constant_p(str) ? __extension__ (rb_intern2((str), (long)strlen(str))) : (rb_intern)(str))
17330#define rb_varargs_argc_check_runtime(argc,vargc) (((argc) <= (vargc)) ? (argc) : (rb_fatal("argc(%d) exceeds actual arguments(%d)", argc, vargc), 0))
17331#define rb_varargs_argc_valid_p(argc,vargc) ((argc) == 0 ? (vargc) <= 1 : (argc) == (vargc))
17332#define rb_varargs_argc_check(argc,vargc) __builtin_choose_expr(__builtin_constant_p(argc), (rb_varargs_argc_valid_p(argc, vargc) ? (argc) : rb_varargs_bad_length(argc, vargc)), rb_varargs_argc_check_runtime(argc, vargc))
17333#define rb_funcall2 rb_funcallv
17334#define rb_funcall3 rb_funcallv_public
17335#define HAVE_RB_SCAN_ARGS_OPTIONAL_HASH 1
17336#define ruby_verbose (*rb_ruby_verbose_ptr())
17337#define ruby_debug (*rb_ruby_debug_ptr())
17338#define RB_IO_WAIT_READABLE RB_IO_WAIT_READABLE
17339#define RB_IO_WAIT_WRITABLE RB_IO_WAIT_WRITABLE
17340#define RUBY_BLOCK_CALL_FUNC_TAKES_BLOCKARG 1
17341#define RB_BLOCK_CALL_FUNC_ARGLIST(yielded_arg,callback_arg) VALUE yielded_arg, VALUE callback_arg, int argc, const VALUE *argv, VALUE blockarg
17342#define rb_type_p(obj,type) __extension__ (__builtin_constant_p(type) ? RB_TYPE_P((obj), (type)) : rb_type(obj) == (type))
17343#define rb_special_const_p(obj) __extension__ ({ VALUE special_const_obj = (obj); (int)(RB_SPECIAL_CONST_P(special_const_obj) ? RUBY_Qtrue : RUBY_Qfalse); })
17344#define RUBY_INTERN_H 1
17345#define RUBY_ST_H 1
17346#pragma GCC visibility push(default)
17347#define ST_DATA_T_DEFINED
17348#define MAX_ST_INDEX_VAL (~(st_index_t) 0)
17349#define SIZEOF_ST_INDEX_T SIZEOF_VOIDP
17350#define ST_INDEX_BITS (SIZEOF_ST_INDEX_T * CHAR_BIT)
17351#define ST_DATA_COMPATIBLE_P(type) __builtin_choose_expr(__builtin_types_compatible_p(type, st_data_t), 1, 0)
17352#define st_is_member(table,key) st_lookup((table),(key),(st_data_t *)0)
17353#define st_strcasecmp st_locale_insensitive_strcasecmp
17354#define st_strncasecmp st_locale_insensitive_strncasecmp
17355#define st_hash_start(h) ((st_index_t)(h))
17356#pragma GCC visibility pop
17357#define MJIT_STATIC static
17358#pragma GCC visibility push(default)
17359#define UNLIMITED_ARGUMENTS (-1)
17360#define rb_ary_new2 rb_ary_new_capa
17361#define rb_ary_new3 rb_ary_new_from_args
17362#define rb_ary_new4 rb_ary_new_from_values
17363#define rb_big2int(x) rb_big2long(x)
17364#define rb_big2uint(x) rb_big2ulong(x)
17365#define INTEGER_PACK_MSWORD_FIRST 0x01
17366#define INTEGER_PACK_LSWORD_FIRST 0x02
17367#define INTEGER_PACK_MSBYTE_FIRST 0x10
17368#define INTEGER_PACK_LSBYTE_FIRST 0x20
17369#define INTEGER_PACK_NATIVE_BYTE_ORDER 0x40
17370#define INTEGER_PACK_2COMP 0x80
17371#define INTEGER_PACK_FORCE_GENERIC_IMPLEMENTATION 0x400
17372#define INTEGER_PACK_FORCE_BIGNUM 0x100
17373#define INTEGER_PACK_NEGATIVE 0x200
17374#define INTEGER_PACK_LITTLE_ENDIAN (INTEGER_PACK_LSWORD_FIRST | INTEGER_PACK_LSBYTE_FIRST)
17375#define INTEGER_PACK_BIG_ENDIAN (INTEGER_PACK_MSWORD_FIRST | INTEGER_PACK_MSBYTE_FIRST)
17376#define rb_rational_raw1(x) rb_rational_raw((x), INT2FIX(1))
17377#define rb_rational_raw2(x,y) rb_rational_raw((x), (y))
17378#define rb_rational_new1(x) rb_rational_new((x), INT2FIX(1))
17379#define rb_rational_new2(x,y) rb_rational_new((x), (y))
17380#define rb_Rational1(x) rb_Rational((x), INT2FIX(1))
17381#define rb_Rational2(x,y) rb_Rational((x), (y))
17382#define rb_complex_raw1(x) rb_complex_raw((x), INT2FIX(0))
17383#define rb_complex_raw2(x,y) rb_complex_raw((x), (y))
17384#define rb_complex_new1(x) rb_complex_new((x), INT2FIX(0))
17385#define rb_complex_new2(x,y) rb_complex_new((x), (y))
17386#define rb_complex_add rb_complex_plus
17387#define rb_complex_sub rb_complex_minus
17388#define rb_complex_nagate rb_complex_uminus
17389#define rb_Complex1(x) rb_Complex((x), INT2FIX(0))
17390#define rb_Complex2(x,y) rb_Complex((x), (y))
17391#define SIZED_ENUMERATOR(obj,argc,argv,size_fn) rb_enumeratorize_with_size((obj), ID2SYM(rb_frame_this_func()), (argc), (argv), (size_fn))
17392#define RETURN_SIZED_ENUMERATOR(obj,argc,argv,size_fn) do { if (!rb_block_given_p()) return SIZED_ENUMERATOR(obj, argc, argv, size_fn); } while (0)
17393#define RETURN_ENUMERATOR(obj,argc,argv) RETURN_SIZED_ENUMERATOR(obj, argc, argv, 0)
17394#define rb_exc_new2 rb_exc_new_cstr
17395#define rb_exc_new3 rb_exc_new_str
17396#define rb_check_frozen_internal(obj) do { VALUE frozen_obj = (obj); if (RB_UNLIKELY(RB_OBJ_FROZEN(frozen_obj))) { rb_error_frozen_object(frozen_obj); } } while (0)
17397#define rb_check_trusted_internal(obj) ((void) 0)
17398#define rb_check_frozen(obj) __extension__({rb_check_frozen_internal(obj);})
17399#define rb_check_trusted(obj) __extension__({rb_check_trusted_internal(obj);})
17400#define RB_OBJ_INIT_COPY(obj,orig) ((obj) != (orig) && (rb_obj_init_copy((obj), (orig)), 1))
17401#define OBJ_INIT_COPY(obj,orig) RB_OBJ_INIT_COPY(obj, orig)
17402#define rb_check_arity rb_check_arity
17403#define rb_fd_ptr(f) ((f)->fdset)
17404#define rb_fd_max(f) ((f)->maxfd)
17405#define HAVE_RB_DEFINE_ALLOC_FUNC 1
17406#define rb_defout rb_stdout
17407#define RB_RESERVED_FD_P(fd) rb_reserved_fd_p(fd)
17408#define RB_NUM_COERCE_FUNCS_NEED_OPID 1
17409#define rb_memcmp memcmp
17410#define HAVE_RB_REG_NEW_STR 1
17411#define rb_argv rb_get_argv()
17412#define posix_signal ruby_posix_signal
17413#define rb_str_dup_frozen rb_str_new_frozen
17414#define rb_hash_uint32(h,i) st_hash_uint32((h), (i))
17415#define rb_hash_uint(h,i) st_hash_uint((h), (i))
17416#define rb_hash_end(h) st_hash_end(h)
17417#define rb_str_new(str,len) RB_GNUC_EXTENSION_BLOCK( (__builtin_constant_p(str) && __builtin_constant_p(len)) ? rb_str_new_static((str), (len)) : rb_str_new((str), (len)) )
17418#define rb_str_new_cstr(str) RB_GNUC_EXTENSION_BLOCK( (__builtin_constant_p(str)) ? rb_str_new_static((str), (long)strlen(str)) : rb_str_new_cstr(str) )
17419#define rb_usascii_str_new(str,len) RB_GNUC_EXTENSION_BLOCK( (__builtin_constant_p(str) && __builtin_constant_p(len)) ? rb_usascii_str_new_static((str), (len)) : rb_usascii_str_new((str), (len)) )
17420#define rb_utf8_str_new(str,len) RB_GNUC_EXTENSION_BLOCK( (__builtin_constant_p(str) && __builtin_constant_p(len)) ? rb_utf8_str_new_static((str), (len)) : rb_utf8_str_new((str), (len)) )
17421#define rb_tainted_str_new_cstr(str) RB_GNUC_EXTENSION_BLOCK( (__builtin_constant_p(str)) ? rb_tainted_str_new((str), (long)strlen(str)) : rb_tainted_str_new_cstr(str) )
17422#define rb_usascii_str_new_cstr(str) RB_GNUC_EXTENSION_BLOCK( (__builtin_constant_p(str)) ? rb_usascii_str_new_static((str), (long)strlen(str)) : rb_usascii_str_new_cstr(str) )
17423#define rb_utf8_str_new_cstr(str) RB_GNUC_EXTENSION_BLOCK( (__builtin_constant_p(str)) ? rb_utf8_str_new_static((str), (long)strlen(str)) : rb_utf8_str_new_cstr(str) )
17424#define rb_external_str_new_cstr(str) RB_GNUC_EXTENSION_BLOCK( (__builtin_constant_p(str)) ? rb_external_str_new((str), (long)strlen(str)) : rb_external_str_new_cstr(str) )
17425#define rb_locale_str_new_cstr(str) RB_GNUC_EXTENSION_BLOCK( (__builtin_constant_p(str)) ? rb_locale_str_new((str), (long)strlen(str)) : rb_locale_str_new_cstr(str) )
17426#define rb_str_buf_new_cstr(str) RB_GNUC_EXTENSION_BLOCK( (__builtin_constant_p(str)) ? rb_str_buf_cat(rb_str_buf_new((long)strlen(str)), (str), (long)strlen(str)) : rb_str_buf_new_cstr(str) )
17427#define rb_str_cat_cstr(str,ptr) RB_GNUC_EXTENSION_BLOCK( (__builtin_constant_p(ptr)) ? rb_str_cat((str), (ptr), (long)strlen(ptr)) : rb_str_cat_cstr((str), (ptr)) )
17428#define rb_exc_new_cstr(klass,ptr) RB_GNUC_EXTENSION_BLOCK( (__builtin_constant_p(ptr)) ? rb_exc_new((klass), (ptr), (long)strlen(ptr)) : rb_exc_new_cstr((klass), (ptr)) )
17429#define rb_str_new2 rb_str_new_cstr
17430#define rb_str_new3 rb_str_new_shared
17431#define rb_str_new4 rb_str_new_frozen
17432#define rb_str_new5 rb_str_new_with_class
17433#define rb_tainted_str_new2 rb_tainted_str_new_cstr
17434#define rb_str_buf_new2 rb_str_buf_new_cstr
17435#define rb_usascii_str_new2 rb_usascii_str_new_cstr
17436#define rb_str_buf_cat rb_str_cat
17437#define rb_str_buf_cat2 rb_str_cat_cstr
17438#define rb_str_cat2 rb_str_cat_cstr
17439#define rb_strlen_lit(str) (sizeof(str "") - 1)
17440#define rb_str_new_lit(str) rb_str_new_static((str), rb_strlen_lit(str))
17441#define rb_usascii_str_new_lit(str) rb_usascii_str_new_static((str), rb_strlen_lit(str))
17442#define rb_utf8_str_new_lit(str) rb_utf8_str_new_static((str), rb_strlen_lit(str))
17443#define rb_enc_str_new_lit(str,enc) rb_enc_str_new_static((str), rb_strlen_lit(str), (enc))
17444#define rb_str_new_literal(str) rb_str_new_lit(str)
17445#define rb_usascii_str_new_literal(str) rb_usascii_str_new_lit(str)
17446#define rb_utf8_str_new_literal(str) rb_utf8_str_new_lit(str)
17447#define rb_enc_str_new_literal(str,enc) rb_enc_str_new_lit(str, enc)
17448#define RUBY_UBF_IO ((rb_unblock_function_t *)-1)
17449#define RUBY_UBF_PROCESS ((rb_unblock_function_t *)-1)
17450#pragma GCC visibility pop
17451#define FIX_CONST_VALUE_PTR(x) (x)
17452#define RUBY_VM 1
17453#define HAVE_NATIVETHREAD
17454#define RUBY_EVENT_NONE 0x0000
17455#define RUBY_EVENT_LINE 0x0001
17456#define RUBY_EVENT_CLASS 0x0002
17457#define RUBY_EVENT_END 0x0004
17458#define RUBY_EVENT_CALL 0x0008
17459#define RUBY_EVENT_RETURN 0x0010
17460#define RUBY_EVENT_C_CALL 0x0020
17461#define RUBY_EVENT_C_RETURN 0x0040
17462#define RUBY_EVENT_RAISE 0x0080
17463#define RUBY_EVENT_ALL 0x00ff
17464#define RUBY_EVENT_B_CALL 0x0100
17465#define RUBY_EVENT_B_RETURN 0x0200
17466#define RUBY_EVENT_THREAD_BEGIN 0x0400
17467#define RUBY_EVENT_THREAD_END 0x0800
17468#define RUBY_EVENT_FIBER_SWITCH 0x1000
17469#define RUBY_EVENT_SCRIPT_COMPILED 0x2000
17470#define RUBY_EVENT_TRACEPOINT_ALL 0xffff
17471#define RUBY_EVENT_RESERVED_FOR_INTERNAL_USE 0x030000
17472#define RUBY_INTERNAL_EVENT_SWITCH 0x040000
17473#define RUBY_EVENT_SWITCH 0x040000
17474#define RUBY_INTERNAL_EVENT_NEWOBJ 0x100000
17475#define RUBY_INTERNAL_EVENT_FREEOBJ 0x200000
17476#define RUBY_INTERNAL_EVENT_GC_START 0x400000
17477#define RUBY_INTERNAL_EVENT_GC_END_MARK 0x800000
17478#define RUBY_INTERNAL_EVENT_GC_END_SWEEP 0x1000000
17479#define RUBY_INTERNAL_EVENT_GC_ENTER 0x2000000
17480#define RUBY_INTERNAL_EVENT_GC_EXIT 0x4000000
17481#define RUBY_INTERNAL_EVENT_OBJSPACE_MASK 0x7f00000
17482#define RUBY_INTERNAL_EVENT_MASK 0xffff0000
17483#define RB_EVENT_HOOKS_HAVE_CALLBACK_DATA 1
17484#define ISASCII(c) rb_isascii(c)
17485#define ISPRINT(c) rb_isprint(c)
17486#define ISGRAPH(c) rb_isgraph(c)
17487#define ISSPACE(c) rb_isspace(c)
17488#define ISUPPER(c) rb_isupper(c)
17489#define ISLOWER(c) rb_islower(c)
17490#define ISALNUM(c) rb_isalnum(c)
17491#define ISALPHA(c) rb_isalpha(c)
17492#define ISDIGIT(c) rb_isdigit(c)
17493#define ISXDIGIT(c) rb_isxdigit(c)
17494#define TOUPPER(c) rb_toupper(c)
17495#define TOLOWER(c) rb_tolower(c)
17496#define STRCASECMP(s1,s2) (st_locale_insensitive_strcasecmp((s1), (s2)))
17497#define STRNCASECMP(s1,s2,n) (st_locale_insensitive_strncasecmp((s1), (s2), (n)))
17498#define STRTOUL(str,endptr,base) (ruby_strtoul((str), (endptr), (base)))
17499#define InitVM(ext) {void InitVM_ ##ext(void);InitVM_ ##ext();}
17500#define rb_scan_args(argc,argvp,fmt,...) __builtin_choose_expr(__builtin_constant_p(fmt), rb_scan_args0(argc,argvp,fmt, (sizeof((VALUE*[]){__VA_ARGS__})/sizeof(VALUE*)), ((VALUE*[]){__VA_ARGS__})), rb_scan_args(argc,argvp,fmt,__VA_ARGS__))
17501#define rb_scan_args_isdigit(c) ((unsigned char)((c)-'0')<10)
17502#define rb_scan_args_count_end(fmt,ofs,varc,vari) ((vari)/(!fmt[ofs] || rb_scan_args_bad_format(fmt)))
17503#define rb_scan_args_count_block(fmt,ofs,varc,vari) (fmt[ofs]!='&' ? rb_scan_args_count_end(fmt, ofs, varc, vari) : rb_scan_args_count_end(fmt, ofs+1, varc, vari+1))
17504#define rb_scan_args_count_hash(fmt,ofs,varc,vari) (fmt[ofs]!=':' ? rb_scan_args_count_block(fmt, ofs, varc, vari) : rb_scan_args_count_block(fmt, ofs+1, varc, vari+1))
17505#define rb_scan_args_count_trail(fmt,ofs,varc,vari) (!rb_scan_args_isdigit(fmt[ofs]) ? rb_scan_args_count_hash(fmt, ofs, varc, vari) : rb_scan_args_count_hash(fmt, ofs+1, varc, vari+(fmt[ofs]-'0')))
17506#define rb_scan_args_count_var(fmt,ofs,varc,vari) (fmt[ofs]!='*' ? rb_scan_args_count_trail(fmt, ofs, varc, vari) : rb_scan_args_count_trail(fmt, ofs+1, varc, vari+1))
17507#define rb_scan_args_count_opt(fmt,ofs,varc,vari) (!rb_scan_args_isdigit(fmt[1]) ? rb_scan_args_count_var(fmt, ofs, varc, vari) : rb_scan_args_count_var(fmt, ofs+1, varc, vari+fmt[ofs]-'0'))
17508#define rb_scan_args_count(fmt,varc) (!rb_scan_args_isdigit(fmt[0]) ? rb_scan_args_count_var(fmt, 0, varc, 0) : rb_scan_args_count_opt(fmt, 1, varc, fmt[0]-'0'))
17509#define rb_scan_args_verify_count(fmt,varc) ((varc)/(rb_scan_args_count(fmt, varc) == (varc) || rb_scan_args_length_mismatch(fmt, varc)))
17510#define rb_scan_args_verify(fmt,varc) (void)__extension__ ({ int verify; _Pragma("GCC diagnostic push"); _Pragma("GCC diagnostic ignored \"-Warray-bounds\""); verify = rb_scan_args_verify_count(fmt, varc); _Pragma("GCC diagnostic pop"); verify; })
17511#define rb_scan_args0(argc,argv,fmt,varc,vars) rb_scan_args_set(argc, argv, rb_scan_args_n_lead(fmt), rb_scan_args_n_opt(fmt), rb_scan_args_n_trail(fmt), rb_scan_args_f_var(fmt), rb_scan_args_f_hash(fmt), rb_scan_args_f_block(fmt), (rb_scan_args_verify(fmt, varc), vars), (char *)fmt, varc)
17512#define rb_yield_values(argc,...) __extension__({ const int rb_yield_values_argc = (argc); const VALUE rb_yield_values_args[] = {__VA_ARGS__}; const int rb_yield_values_nargs = (int)(sizeof(rb_yield_values_args) / sizeof(VALUE)); rb_yield_values2( rb_varargs_argc_check(rb_yield_values_argc, rb_yield_values_nargs), rb_yield_values_nargs ? rb_yield_values_args : NULL); })
17513#define rb_funcall(recv,mid,argc,...) __extension__({ const int rb_funcall_argc = (argc); const VALUE rb_funcall_args[] = {__VA_ARGS__}; const int rb_funcall_nargs = (int)(sizeof(rb_funcall_args) / sizeof(VALUE)); rb_funcallv(recv, mid, rb_varargs_argc_check(rb_funcall_argc, rb_funcall_nargs), rb_funcall_nargs ? rb_funcall_args : NULL); })
17514#define RUBY_SUBST_H 1
17515#undef snprintf
17516#undef vsnprintf
17517#define snprintf ruby_snprintf
17518#define vsnprintf ruby_vsnprintf
17519#define RUBY_INIT_STACK VALUE variable_in_this_stack_frame; ruby_init_stack(&variable_in_this_stack_frame);
17520#define Init_stack(addr) ruby_init_stack(addr)
17521#pragma GCC visibility pop
17522#define _STDBOOL_H
17523#define bool _Bool
17524#define true 1
17525#define false 0
17526#define __bool_true_false_are_defined 1
17527#define HALF_LONG_MSB ((SIGNED_VALUE)1<<((SIZEOF_LONG*CHAR_BIT-1)/2))
17528#define LIKELY(x) RB_LIKELY(x)
17529#define UNLIKELY(x) RB_UNLIKELY(x)
17530#define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS(x) NO_SANITIZE("address", NOINLINE(x))
17531#undef NO_SANITIZE
17532#define NO_SANITIZE(x,y) COMPILER_WARNING_PUSH; COMPILER_WARNING_IGNORED(-Wattributes); __attribute__((__no_sanitize__(x))) y; COMPILER_WARNING_POP
17533#define __MEMCHECK_H
17534#define __VALGRIND_H
17535#define __VALGRIND_MAJOR__ 3
17536#define __VALGRIND_MINOR__ 16
17537#undef PLAT_x86_darwin
17538#undef PLAT_amd64_darwin
17539#undef PLAT_x86_win32
17540#undef PLAT_amd64_win64
17541#undef PLAT_x86_linux
17542#undef PLAT_amd64_linux
17543#undef PLAT_ppc32_linux
17544#undef PLAT_ppc64be_linux
17545#undef PLAT_ppc64le_linux
17546#undef PLAT_arm_linux
17547#undef PLAT_arm64_linux
17548#undef PLAT_s390x_linux
17549#undef PLAT_mips32_linux
17550#undef PLAT_mips64_linux
17551#undef PLAT_nanomips_linux
17552#undef PLAT_x86_solaris
17553#undef PLAT_amd64_solaris
17554#define PLAT_amd64_linux 1
17555#define VALGRIND_DO_CLIENT_REQUEST(_zzq_rlval,_zzq_default,_zzq_request,_zzq_arg1,_zzq_arg2,_zzq_arg3,_zzq_arg4,_zzq_arg5) do { (_zzq_rlval) = VALGRIND_DO_CLIENT_REQUEST_EXPR((_zzq_default), (_zzq_request), (_zzq_arg1), (_zzq_arg2), (_zzq_arg3), (_zzq_arg4), (_zzq_arg5)); } while (0)
17556#define VALGRIND_DO_CLIENT_REQUEST_STMT(_zzq_request,_zzq_arg1,_zzq_arg2,_zzq_arg3,_zzq_arg4,_zzq_arg5) do { (void) VALGRIND_DO_CLIENT_REQUEST_EXPR(0, (_zzq_request), (_zzq_arg1), (_zzq_arg2), (_zzq_arg3), (_zzq_arg4), (_zzq_arg5)); } while (0)
17557#define __SPECIAL_INSTRUCTION_PREAMBLE "rolq $3, %%rdi ; rolq $13, %%rdi\n\t" "rolq $61, %%rdi ; rolq $51, %%rdi\n\t"
17558#define VALGRIND_DO_CLIENT_REQUEST_EXPR(_zzq_default,_zzq_request,_zzq_arg1,_zzq_arg2,_zzq_arg3,_zzq_arg4,_zzq_arg5) __extension__ ({ volatile unsigned long int _zzq_args[6]; volatile unsigned long int _zzq_result; _zzq_args[0] = (unsigned long int)(_zzq_request); _zzq_args[1] = (unsigned long int)(_zzq_arg1); _zzq_args[2] = (unsigned long int)(_zzq_arg2); _zzq_args[3] = (unsigned long int)(_zzq_arg3); _zzq_args[4] = (unsigned long int)(_zzq_arg4); _zzq_args[5] = (unsigned long int)(_zzq_arg5); __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE "xchgq %%rbx,%%rbx" : "=d" (_zzq_result) : "a" (&_zzq_args[0]), "0" (_zzq_default) : "cc", "memory" ); _zzq_result; })
17559#define VALGRIND_GET_NR_CONTEXT(_zzq_rlval) { volatile OrigFn* _zzq_orig = &(_zzq_rlval); volatile unsigned long int __addr; __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE "xchgq %%rcx,%%rcx" : "=a" (__addr) : : "cc", "memory" ); _zzq_orig->nraddr = __addr; }
17560#define VALGRIND_CALL_NOREDIR_RAX __SPECIAL_INSTRUCTION_PREAMBLE "xchgq %%rdx,%%rdx\n\t"
17561#define VALGRIND_VEX_INJECT_IR() do { __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE "xchgq %%rdi,%%rdi\n\t" : : : "cc", "memory" ); } while (0)
17562#define VG_CONCAT4(_aa,_bb,_cc,_dd) _aa ##_bb ##_cc ##_dd
17563#define I_WRAP_SONAME_FNNAME_ZU(soname,fnname) VG_CONCAT4(_vgw00000ZU_,soname,_,fnname)
17564#define I_WRAP_SONAME_FNNAME_ZZ(soname,fnname) VG_CONCAT4(_vgw00000ZZ_,soname,_,fnname)
17565#define VALGRIND_GET_ORIG_FN(_lval) VALGRIND_GET_NR_CONTEXT(_lval)
17566#define I_REPLACE_SONAME_FNNAME_ZU(soname,fnname) VG_CONCAT4(_vgr00000ZU_,soname,_,fnname)
17567#define I_REPLACE_SONAME_FNNAME_ZZ(soname,fnname) VG_CONCAT4(_vgr00000ZZ_,soname,_,fnname)
17568#define CALL_FN_v_v(fnptr) do { volatile unsigned long _junk; CALL_FN_W_v(_junk,fnptr); } while (0)
17569#define CALL_FN_v_W(fnptr,arg1) do { volatile unsigned long _junk; CALL_FN_W_W(_junk,fnptr,arg1); } while (0)
17570#define CALL_FN_v_WW(fnptr,arg1,arg2) do { volatile unsigned long _junk; CALL_FN_W_WW(_junk,fnptr,arg1,arg2); } while (0)
17571#define CALL_FN_v_WWW(fnptr,arg1,arg2,arg3) do { volatile unsigned long _junk; CALL_FN_W_WWW(_junk,fnptr,arg1,arg2,arg3); } while (0)
17572#define CALL_FN_v_WWWW(fnptr,arg1,arg2,arg3,arg4) do { volatile unsigned long _junk; CALL_FN_W_WWWW(_junk,fnptr,arg1,arg2,arg3,arg4); } while (0)
17573#define CALL_FN_v_5W(fnptr,arg1,arg2,arg3,arg4,arg5) do { volatile unsigned long _junk; CALL_FN_W_5W(_junk,fnptr,arg1,arg2,arg3,arg4,arg5); } while (0)
17574#define CALL_FN_v_6W(fnptr,arg1,arg2,arg3,arg4,arg5,arg6) do { volatile unsigned long _junk; CALL_FN_W_6W(_junk,fnptr,arg1,arg2,arg3,arg4,arg5,arg6); } while (0)
17575#define CALL_FN_v_7W(fnptr,arg1,arg2,arg3,arg4,arg5,arg6,arg7) do { volatile unsigned long _junk; CALL_FN_W_7W(_junk,fnptr,arg1,arg2,arg3,arg4,arg5,arg6,arg7); } while (0)
17576#define __CALLER_SAVED_REGS "rcx", "rdx", "rsi", "rdi", "r8", "r9", "r10", "r11"
17577#define __FRAME_POINTER ,"r"(__builtin_dwarf_cfa())
17578#define VALGRIND_CFI_PROLOGUE "movq %%rbp, %%r15\n\t" "movq %2, %%rbp\n\t" ".cfi_remember_state\n\t" ".cfi_def_cfa rbp, 0\n\t"
17579#define VALGRIND_CFI_EPILOGUE "movq %%r15, %%rbp\n\t" ".cfi_restore_state\n\t"
17580#define VALGRIND_ALIGN_STACK "movq %%rsp,%%r14\n\t" "andq $0xfffffffffffffff0,%%rsp\n\t"
17581#define VALGRIND_RESTORE_STACK "movq %%r14,%%rsp\n\t"
17582#define CALL_FN_W_v(lval,orig) do { volatile OrigFn _orig = (orig); volatile unsigned long _argvec[1]; volatile unsigned long _res; _argvec[0] = (unsigned long)_orig.nraddr; __asm__ volatile( VALGRIND_CFI_PROLOGUE VALGRIND_ALIGN_STACK "subq $128,%%rsp\n\t" "movq (%%rax), %%rax\n\t" VALGRIND_CALL_NOREDIR_RAX VALGRIND_RESTORE_STACK VALGRIND_CFI_EPILOGUE : "=a" (_res) : "a" (&_argvec[0]) __FRAME_POINTER : "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" ); lval = (__typeof__(lval)) _res; } while (0)
17583#define CALL_FN_W_W(lval,orig,arg1) do { volatile OrigFn _orig = (orig); volatile unsigned long _argvec[2]; volatile unsigned long _res; _argvec[0] = (unsigned long)_orig.nraddr; _argvec[1] = (unsigned long)(arg1); __asm__ volatile( VALGRIND_CFI_PROLOGUE VALGRIND_ALIGN_STACK "subq $128,%%rsp\n\t" "movq 8(%%rax), %%rdi\n\t" "movq (%%rax), %%rax\n\t" VALGRIND_CALL_NOREDIR_RAX VALGRIND_RESTORE_STACK VALGRIND_CFI_EPILOGUE : "=a" (_res) : "a" (&_argvec[0]) __FRAME_POINTER : "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" ); lval = (__typeof__(lval)) _res; } while (0)
17584#define CALL_FN_W_WW(lval,orig,arg1,arg2) do { volatile OrigFn _orig = (orig); volatile unsigned long _argvec[3]; volatile unsigned long _res; _argvec[0] = (unsigned long)_orig.nraddr; _argvec[1] = (unsigned long)(arg1); _argvec[2] = (unsigned long)(arg2); __asm__ volatile( VALGRIND_CFI_PROLOGUE VALGRIND_ALIGN_STACK "subq $128,%%rsp\n\t" "movq 16(%%rax), %%rsi\n\t" "movq 8(%%rax), %%rdi\n\t" "movq (%%rax), %%rax\n\t" VALGRIND_CALL_NOREDIR_RAX VALGRIND_RESTORE_STACK VALGRIND_CFI_EPILOGUE : "=a" (_res) : "a" (&_argvec[0]) __FRAME_POINTER : "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" ); lval = (__typeof__(lval)) _res; } while (0)
17585#define CALL_FN_W_WWW(lval,orig,arg1,arg2,arg3) do { volatile OrigFn _orig = (orig); volatile unsigned long _argvec[4]; volatile unsigned long _res; _argvec[0] = (unsigned long)_orig.nraddr; _argvec[1] = (unsigned long)(arg1); _argvec[2] = (unsigned long)(arg2); _argvec[3] = (unsigned long)(arg3); __asm__ volatile( VALGRIND_CFI_PROLOGUE VALGRIND_ALIGN_STACK "subq $128,%%rsp\n\t" "movq 24(%%rax), %%rdx\n\t" "movq 16(%%rax), %%rsi\n\t" "movq 8(%%rax), %%rdi\n\t" "movq (%%rax), %%rax\n\t" VALGRIND_CALL_NOREDIR_RAX VALGRIND_RESTORE_STACK VALGRIND_CFI_EPILOGUE : "=a" (_res) : "a" (&_argvec[0]) __FRAME_POINTER : "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" ); lval = (__typeof__(lval)) _res; } while (0)
17586#define CALL_FN_W_WWWW(lval,orig,arg1,arg2,arg3,arg4) do { volatile OrigFn _orig = (orig); volatile unsigned long _argvec[5]; volatile unsigned long _res; _argvec[0] = (unsigned long)_orig.nraddr; _argvec[1] = (unsigned long)(arg1); _argvec[2] = (unsigned long)(arg2); _argvec[3] = (unsigned long)(arg3); _argvec[4] = (unsigned long)(arg4); __asm__ volatile( VALGRIND_CFI_PROLOGUE VALGRIND_ALIGN_STACK "subq $128,%%rsp\n\t" "movq 32(%%rax), %%rcx\n\t" "movq 24(%%rax), %%rdx\n\t" "movq 16(%%rax), %%rsi\n\t" "movq 8(%%rax), %%rdi\n\t" "movq (%%rax), %%rax\n\t" VALGRIND_CALL_NOREDIR_RAX VALGRIND_RESTORE_STACK VALGRIND_CFI_EPILOGUE : "=a" (_res) : "a" (&_argvec[0]) __FRAME_POINTER : "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" ); lval = (__typeof__(lval)) _res; } while (0)
17587#define CALL_FN_W_5W(lval,orig,arg1,arg2,arg3,arg4,arg5) do { volatile OrigFn _orig = (orig); volatile unsigned long _argvec[6]; volatile unsigned long _res; _argvec[0] = (unsigned long)_orig.nraddr; _argvec[1] = (unsigned long)(arg1); _argvec[2] = (unsigned long)(arg2); _argvec[3] = (unsigned long)(arg3); _argvec[4] = (unsigned long)(arg4); _argvec[5] = (unsigned long)(arg5); __asm__ volatile( VALGRIND_CFI_PROLOGUE VALGRIND_ALIGN_STACK "subq $128,%%rsp\n\t" "movq 40(%%rax), %%r8\n\t" "movq 32(%%rax), %%rcx\n\t" "movq 24(%%rax), %%rdx\n\t" "movq 16(%%rax), %%rsi\n\t" "movq 8(%%rax), %%rdi\n\t" "movq (%%rax), %%rax\n\t" VALGRIND_CALL_NOREDIR_RAX VALGRIND_RESTORE_STACK VALGRIND_CFI_EPILOGUE : "=a" (_res) : "a" (&_argvec[0]) __FRAME_POINTER : "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" ); lval = (__typeof__(lval)) _res; } while (0)
17588#define CALL_FN_W_6W(lval,orig,arg1,arg2,arg3,arg4,arg5,arg6) do { volatile OrigFn _orig = (orig); volatile unsigned long _argvec[7]; volatile unsigned long _res; _argvec[0] = (unsigned long)_orig.nraddr; _argvec[1] = (unsigned long)(arg1); _argvec[2] = (unsigned long)(arg2); _argvec[3] = (unsigned long)(arg3); _argvec[4] = (unsigned long)(arg4); _argvec[5] = (unsigned long)(arg5); _argvec[6] = (unsigned long)(arg6); __asm__ volatile( VALGRIND_CFI_PROLOGUE VALGRIND_ALIGN_STACK "subq $128,%%rsp\n\t" "movq 48(%%rax), %%r9\n\t" "movq 40(%%rax), %%r8\n\t" "movq 32(%%rax), %%rcx\n\t" "movq 24(%%rax), %%rdx\n\t" "movq 16(%%rax), %%rsi\n\t" "movq 8(%%rax), %%rdi\n\t" "movq (%%rax), %%rax\n\t" VALGRIND_CALL_NOREDIR_RAX VALGRIND_RESTORE_STACK VALGRIND_CFI_EPILOGUE : "=a" (_res) : "a" (&_argvec[0]) __FRAME_POINTER : "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" ); lval = (__typeof__(lval)) _res; } while (0)
17589#define CALL_FN_W_7W(lval,orig,arg1,arg2,arg3,arg4,arg5,arg6,arg7) do { volatile OrigFn _orig = (orig); volatile unsigned long _argvec[8]; volatile unsigned long _res; _argvec[0] = (unsigned long)_orig.nraddr; _argvec[1] = (unsigned long)(arg1); _argvec[2] = (unsigned long)(arg2); _argvec[3] = (unsigned long)(arg3); _argvec[4] = (unsigned long)(arg4); _argvec[5] = (unsigned long)(arg5); _argvec[6] = (unsigned long)(arg6); _argvec[7] = (unsigned long)(arg7); __asm__ volatile( VALGRIND_CFI_PROLOGUE VALGRIND_ALIGN_STACK "subq $136,%%rsp\n\t" "pushq 56(%%rax)\n\t" "movq 48(%%rax), %%r9\n\t" "movq 40(%%rax), %%r8\n\t" "movq 32(%%rax), %%rcx\n\t" "movq 24(%%rax), %%rdx\n\t" "movq 16(%%rax), %%rsi\n\t" "movq 8(%%rax), %%rdi\n\t" "movq (%%rax), %%rax\n\t" VALGRIND_CALL_NOREDIR_RAX VALGRIND_RESTORE_STACK VALGRIND_CFI_EPILOGUE : "=a" (_res) : "a" (&_argvec[0]) __FRAME_POINTER : "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" ); lval = (__typeof__(lval)) _res; } while (0)
17590#define CALL_FN_W_8W(lval,orig,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8) do { volatile OrigFn _orig = (orig); volatile unsigned long _argvec[9]; volatile unsigned long _res; _argvec[0] = (unsigned long)_orig.nraddr; _argvec[1] = (unsigned long)(arg1); _argvec[2] = (unsigned long)(arg2); _argvec[3] = (unsigned long)(arg3); _argvec[4] = (unsigned long)(arg4); _argvec[5] = (unsigned long)(arg5); _argvec[6] = (unsigned long)(arg6); _argvec[7] = (unsigned long)(arg7); _argvec[8] = (unsigned long)(arg8); __asm__ volatile( VALGRIND_CFI_PROLOGUE VALGRIND_ALIGN_STACK "subq $128,%%rsp\n\t" "pushq 64(%%rax)\n\t" "pushq 56(%%rax)\n\t" "movq 48(%%rax), %%r9\n\t" "movq 40(%%rax), %%r8\n\t" "movq 32(%%rax), %%rcx\n\t" "movq 24(%%rax), %%rdx\n\t" "movq 16(%%rax), %%rsi\n\t" "movq 8(%%rax), %%rdi\n\t" "movq (%%rax), %%rax\n\t" VALGRIND_CALL_NOREDIR_RAX VALGRIND_RESTORE_STACK VALGRIND_CFI_EPILOGUE : "=a" (_res) : "a" (&_argvec[0]) __FRAME_POINTER : "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" ); lval = (__typeof__(lval)) _res; } while (0)
17591#define CALL_FN_W_9W(lval,orig,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9) do { volatile OrigFn _orig = (orig); volatile unsigned long _argvec[10]; volatile unsigned long _res; _argvec[0] = (unsigned long)_orig.nraddr; _argvec[1] = (unsigned long)(arg1); _argvec[2] = (unsigned long)(arg2); _argvec[3] = (unsigned long)(arg3); _argvec[4] = (unsigned long)(arg4); _argvec[5] = (unsigned long)(arg5); _argvec[6] = (unsigned long)(arg6); _argvec[7] = (unsigned long)(arg7); _argvec[8] = (unsigned long)(arg8); _argvec[9] = (unsigned long)(arg9); __asm__ volatile( VALGRIND_CFI_PROLOGUE VALGRIND_ALIGN_STACK "subq $136,%%rsp\n\t" "pushq 72(%%rax)\n\t" "pushq 64(%%rax)\n\t" "pushq 56(%%rax)\n\t" "movq 48(%%rax), %%r9\n\t" "movq 40(%%rax), %%r8\n\t" "movq 32(%%rax), %%rcx\n\t" "movq 24(%%rax), %%rdx\n\t" "movq 16(%%rax), %%rsi\n\t" "movq 8(%%rax), %%rdi\n\t" "movq (%%rax), %%rax\n\t" VALGRIND_CALL_NOREDIR_RAX VALGRIND_RESTORE_STACK VALGRIND_CFI_EPILOGUE : "=a" (_res) : "a" (&_argvec[0]) __FRAME_POINTER : "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" ); lval = (__typeof__(lval)) _res; } while (0)
17592#define CALL_FN_W_10W(lval,orig,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10) do { volatile OrigFn _orig = (orig); volatile unsigned long _argvec[11]; volatile unsigned long _res; _argvec[0] = (unsigned long)_orig.nraddr; _argvec[1] = (unsigned long)(arg1); _argvec[2] = (unsigned long)(arg2); _argvec[3] = (unsigned long)(arg3); _argvec[4] = (unsigned long)(arg4); _argvec[5] = (unsigned long)(arg5); _argvec[6] = (unsigned long)(arg6); _argvec[7] = (unsigned long)(arg7); _argvec[8] = (unsigned long)(arg8); _argvec[9] = (unsigned long)(arg9); _argvec[10] = (unsigned long)(arg10); __asm__ volatile( VALGRIND_CFI_PROLOGUE VALGRIND_ALIGN_STACK "subq $128,%%rsp\n\t" "pushq 80(%%rax)\n\t" "pushq 72(%%rax)\n\t" "pushq 64(%%rax)\n\t" "pushq 56(%%rax)\n\t" "movq 48(%%rax), %%r9\n\t" "movq 40(%%rax), %%r8\n\t" "movq 32(%%rax), %%rcx\n\t" "movq 24(%%rax), %%rdx\n\t" "movq 16(%%rax), %%rsi\n\t" "movq 8(%%rax), %%rdi\n\t" "movq (%%rax), %%rax\n\t" VALGRIND_CALL_NOREDIR_RAX VALGRIND_RESTORE_STACK VALGRIND_CFI_EPILOGUE : "=a" (_res) : "a" (&_argvec[0]) __FRAME_POINTER : "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" ); lval = (__typeof__(lval)) _res; } while (0)
17593#define CALL_FN_W_11W(lval,orig,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11) do { volatile OrigFn _orig = (orig); volatile unsigned long _argvec[12]; volatile unsigned long _res; _argvec[0] = (unsigned long)_orig.nraddr; _argvec[1] = (unsigned long)(arg1); _argvec[2] = (unsigned long)(arg2); _argvec[3] = (unsigned long)(arg3); _argvec[4] = (unsigned long)(arg4); _argvec[5] = (unsigned long)(arg5); _argvec[6] = (unsigned long)(arg6); _argvec[7] = (unsigned long)(arg7); _argvec[8] = (unsigned long)(arg8); _argvec[9] = (unsigned long)(arg9); _argvec[10] = (unsigned long)(arg10); _argvec[11] = (unsigned long)(arg11); __asm__ volatile( VALGRIND_CFI_PROLOGUE VALGRIND_ALIGN_STACK "subq $136,%%rsp\n\t" "pushq 88(%%rax)\n\t" "pushq 80(%%rax)\n\t" "pushq 72(%%rax)\n\t" "pushq 64(%%rax)\n\t" "pushq 56(%%rax)\n\t" "movq 48(%%rax), %%r9\n\t" "movq 40(%%rax), %%r8\n\t" "movq 32(%%rax), %%rcx\n\t" "movq 24(%%rax), %%rdx\n\t" "movq 16(%%rax), %%rsi\n\t" "movq 8(%%rax), %%rdi\n\t" "movq (%%rax), %%rax\n\t" VALGRIND_CALL_NOREDIR_RAX VALGRIND_RESTORE_STACK VALGRIND_CFI_EPILOGUE : "=a" (_res) : "a" (&_argvec[0]) __FRAME_POINTER : "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" ); lval = (__typeof__(lval)) _res; } while (0)
17594#define CALL_FN_W_12W(lval,orig,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12) do { volatile OrigFn _orig = (orig); volatile unsigned long _argvec[13]; volatile unsigned long _res; _argvec[0] = (unsigned long)_orig.nraddr; _argvec[1] = (unsigned long)(arg1); _argvec[2] = (unsigned long)(arg2); _argvec[3] = (unsigned long)(arg3); _argvec[4] = (unsigned long)(arg4); _argvec[5] = (unsigned long)(arg5); _argvec[6] = (unsigned long)(arg6); _argvec[7] = (unsigned long)(arg7); _argvec[8] = (unsigned long)(arg8); _argvec[9] = (unsigned long)(arg9); _argvec[10] = (unsigned long)(arg10); _argvec[11] = (unsigned long)(arg11); _argvec[12] = (unsigned long)(arg12); __asm__ volatile( VALGRIND_CFI_PROLOGUE VALGRIND_ALIGN_STACK "subq $128,%%rsp\n\t" "pushq 96(%%rax)\n\t" "pushq 88(%%rax)\n\t" "pushq 80(%%rax)\n\t" "pushq 72(%%rax)\n\t" "pushq 64(%%rax)\n\t" "pushq 56(%%rax)\n\t" "movq 48(%%rax), %%r9\n\t" "movq 40(%%rax), %%r8\n\t" "movq 32(%%rax), %%rcx\n\t" "movq 24(%%rax), %%rdx\n\t" "movq 16(%%rax), %%rsi\n\t" "movq 8(%%rax), %%rdi\n\t" "movq (%%rax), %%rax\n\t" VALGRIND_CALL_NOREDIR_RAX VALGRIND_RESTORE_STACK VALGRIND_CFI_EPILOGUE : "=a" (_res) : "a" (&_argvec[0]) __FRAME_POINTER : "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" ); lval = (__typeof__(lval)) _res; } while (0)
17595#define VG_USERREQ_TOOL_BASE(a,b) ((unsigned int)(((a)&0xff) << 24 | ((b)&0xff) << 16))
17596#define VG_IS_TOOL_USERREQ(a,b,v) (VG_USERREQ_TOOL_BASE(a,b) == ((v) & 0xffff0000))
17597#define RUNNING_ON_VALGRIND (unsigned)VALGRIND_DO_CLIENT_REQUEST_EXPR(0 , VG_USERREQ__RUNNING_ON_VALGRIND, 0, 0, 0, 0, 0)
17598#define VALGRIND_DISCARD_TRANSLATIONS(_qzz_addr,_qzz_len) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__DISCARD_TRANSLATIONS, _qzz_addr, _qzz_len, 0, 0, 0)
17599#define VALGRIND_INNER_THREADS(_qzz_addr) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__INNER_THREADS, _qzz_addr, 0, 0, 0, 0)
17600#define VALGRIND_NON_SIMD_CALL0(_qyy_fn) VALGRIND_DO_CLIENT_REQUEST_EXPR(0 , VG_USERREQ__CLIENT_CALL0, _qyy_fn, 0, 0, 0, 0)
17601#define VALGRIND_NON_SIMD_CALL1(_qyy_fn,_qyy_arg1) VALGRIND_DO_CLIENT_REQUEST_EXPR(0 , VG_USERREQ__CLIENT_CALL1, _qyy_fn, _qyy_arg1, 0, 0, 0)
17602#define VALGRIND_NON_SIMD_CALL2(_qyy_fn,_qyy_arg1,_qyy_arg2) VALGRIND_DO_CLIENT_REQUEST_EXPR(0 , VG_USERREQ__CLIENT_CALL2, _qyy_fn, _qyy_arg1, _qyy_arg2, 0, 0)
17603#define VALGRIND_NON_SIMD_CALL3(_qyy_fn,_qyy_arg1,_qyy_arg2,_qyy_arg3) VALGRIND_DO_CLIENT_REQUEST_EXPR(0 , VG_USERREQ__CLIENT_CALL3, _qyy_fn, _qyy_arg1, _qyy_arg2, _qyy_arg3, 0)
17604#define VALGRIND_COUNT_ERRORS (unsigned)VALGRIND_DO_CLIENT_REQUEST_EXPR( 0 , VG_USERREQ__COUNT_ERRORS, 0, 0, 0, 0, 0)
17605#define VALGRIND_MALLOCLIKE_BLOCK(addr,sizeB,rzB,is_zeroed) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__MALLOCLIKE_BLOCK, addr, sizeB, rzB, is_zeroed, 0)
17606#define VALGRIND_RESIZEINPLACE_BLOCK(addr,oldSizeB,newSizeB,rzB) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__RESIZEINPLACE_BLOCK, addr, oldSizeB, newSizeB, rzB, 0)
17607#define VALGRIND_FREELIKE_BLOCK(addr,rzB) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__FREELIKE_BLOCK, addr, rzB, 0, 0, 0)
17608#define VALGRIND_CREATE_MEMPOOL(pool,rzB,is_zeroed) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__CREATE_MEMPOOL, pool, rzB, is_zeroed, 0, 0)
17609#define VALGRIND_MEMPOOL_AUTO_FREE 1
17610#define VALGRIND_MEMPOOL_METAPOOL 2
17611#define VALGRIND_CREATE_MEMPOOL_EXT(pool,rzB,is_zeroed,flags) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__CREATE_MEMPOOL, pool, rzB, is_zeroed, flags, 0)
17612#define VALGRIND_DESTROY_MEMPOOL(pool) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__DESTROY_MEMPOOL, pool, 0, 0, 0, 0)
17613#define VALGRIND_MEMPOOL_ALLOC(pool,addr,size) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__MEMPOOL_ALLOC, pool, addr, size, 0, 0)
17614#define VALGRIND_MEMPOOL_FREE(pool,addr) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__MEMPOOL_FREE, pool, addr, 0, 0, 0)
17615#define VALGRIND_MEMPOOL_TRIM(pool,addr,size) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__MEMPOOL_TRIM, pool, addr, size, 0, 0)
17616#define VALGRIND_MOVE_MEMPOOL(poolA,poolB) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__MOVE_MEMPOOL, poolA, poolB, 0, 0, 0)
17617#define VALGRIND_MEMPOOL_CHANGE(pool,addrA,addrB,size) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__MEMPOOL_CHANGE, pool, addrA, addrB, size, 0)
17618#define VALGRIND_MEMPOOL_EXISTS(pool) (unsigned)VALGRIND_DO_CLIENT_REQUEST_EXPR(0, VG_USERREQ__MEMPOOL_EXISTS, pool, 0, 0, 0, 0)
17619#define VALGRIND_STACK_REGISTER(start,end) (unsigned)VALGRIND_DO_CLIENT_REQUEST_EXPR(0, VG_USERREQ__STACK_REGISTER, start, end, 0, 0, 0)
17620#define VALGRIND_STACK_DEREGISTER(id) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__STACK_DEREGISTER, id, 0, 0, 0, 0)
17621#define VALGRIND_STACK_CHANGE(id,start,end) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__STACK_CHANGE, id, start, end, 0, 0)
17622#define VALGRIND_LOAD_PDB_DEBUGINFO(fd,ptr,total_size,delta) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__LOAD_PDB_DEBUGINFO, fd, ptr, total_size, delta, 0)
17623#define VALGRIND_MAP_IP_TO_SRCLOC(addr,buf64) (unsigned)VALGRIND_DO_CLIENT_REQUEST_EXPR(0, VG_USERREQ__MAP_IP_TO_SRCLOC, addr, buf64, 0, 0, 0)
17624#define VALGRIND_DISABLE_ERROR_REPORTING VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__CHANGE_ERR_DISABLEMENT, 1, 0, 0, 0, 0)
17625#define VALGRIND_ENABLE_ERROR_REPORTING VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__CHANGE_ERR_DISABLEMENT, -1, 0, 0, 0, 0)
17626#define VALGRIND_MONITOR_COMMAND(command) VALGRIND_DO_CLIENT_REQUEST_EXPR(0, VG_USERREQ__GDB_MONITOR_COMMAND, command, 0, 0, 0, 0)
17627#define VALGRIND_CLO_CHANGE(option) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__CLO_CHANGE, option, 0, 0, 0, 0)
17628#undef PLAT_x86_darwin
17629#undef PLAT_amd64_darwin
17630#undef PLAT_x86_win32
17631#undef PLAT_amd64_win64
17632#undef PLAT_x86_linux
17633#undef PLAT_amd64_linux
17634#undef PLAT_ppc32_linux
17635#undef PLAT_ppc64be_linux
17636#undef PLAT_ppc64le_linux
17637#undef PLAT_arm_linux
17638#undef PLAT_s390x_linux
17639#undef PLAT_mips32_linux
17640#undef PLAT_mips64_linux
17641#undef PLAT_nanomips_linux
17642#undef PLAT_x86_solaris
17643#undef PLAT_amd64_solaris
17644#define VALGRIND_MAKE_MEM_NOACCESS(_qzz_addr,_qzz_len) VALGRIND_DO_CLIENT_REQUEST_EXPR(0 , VG_USERREQ__MAKE_MEM_NOACCESS, (_qzz_addr), (_qzz_len), 0, 0, 0)
17645#define VALGRIND_MAKE_MEM_UNDEFINED(_qzz_addr,_qzz_len) VALGRIND_DO_CLIENT_REQUEST_EXPR(0 , VG_USERREQ__MAKE_MEM_UNDEFINED, (_qzz_addr), (_qzz_len), 0, 0, 0)
17646#define VALGRIND_MAKE_MEM_DEFINED(_qzz_addr,_qzz_len) VALGRIND_DO_CLIENT_REQUEST_EXPR(0 , VG_USERREQ__MAKE_MEM_DEFINED, (_qzz_addr), (_qzz_len), 0, 0, 0)
17647#define VALGRIND_MAKE_MEM_DEFINED_IF_ADDRESSABLE(_qzz_addr,_qzz_len) VALGRIND_DO_CLIENT_REQUEST_EXPR(0 , VG_USERREQ__MAKE_MEM_DEFINED_IF_ADDRESSABLE, (_qzz_addr), (_qzz_len), 0, 0, 0)
17648#define VALGRIND_CREATE_BLOCK(_qzz_addr,_qzz_len,_qzz_desc) VALGRIND_DO_CLIENT_REQUEST_EXPR(0 , VG_USERREQ__CREATE_BLOCK, (_qzz_addr), (_qzz_len), (_qzz_desc), 0, 0)
17649#define VALGRIND_DISCARD(_qzz_blkindex) VALGRIND_DO_CLIENT_REQUEST_EXPR(0 , VG_USERREQ__DISCARD, 0, (_qzz_blkindex), 0, 0, 0)
17650#define VALGRIND_CHECK_MEM_IS_ADDRESSABLE(_qzz_addr,_qzz_len) VALGRIND_DO_CLIENT_REQUEST_EXPR(0, VG_USERREQ__CHECK_MEM_IS_ADDRESSABLE, (_qzz_addr), (_qzz_len), 0, 0, 0)
17651#define VALGRIND_CHECK_MEM_IS_DEFINED(_qzz_addr,_qzz_len) VALGRIND_DO_CLIENT_REQUEST_EXPR(0, VG_USERREQ__CHECK_MEM_IS_DEFINED, (_qzz_addr), (_qzz_len), 0, 0, 0)
17652#define VALGRIND_CHECK_VALUE_IS_DEFINED(__lvalue) VALGRIND_CHECK_MEM_IS_DEFINED( (volatile unsigned char *)&(__lvalue), (unsigned long)(sizeof (__lvalue)))
17653#define VALGRIND_DO_LEAK_CHECK VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__DO_LEAK_CHECK, 0, 0, 0, 0, 0)
17654#define VALGRIND_DO_ADDED_LEAK_CHECK VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__DO_LEAK_CHECK, 0, 1, 0, 0, 0)
17655#define VALGRIND_DO_CHANGED_LEAK_CHECK VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__DO_LEAK_CHECK, 0, 2, 0, 0, 0)
17656#define VALGRIND_DO_QUICK_LEAK_CHECK VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__DO_LEAK_CHECK, 1, 0, 0, 0, 0)
17657#define VALGRIND_COUNT_LEAKS(leaked,dubious,reachable,suppressed) { unsigned long _qzz_leaked = 0, _qzz_dubious = 0; unsigned long _qzz_reachable = 0, _qzz_suppressed = 0; VALGRIND_DO_CLIENT_REQUEST_STMT( VG_USERREQ__COUNT_LEAKS, &_qzz_leaked, &_qzz_dubious, &_qzz_reachable, &_qzz_suppressed, 0); leaked = _qzz_leaked; dubious = _qzz_dubious; reachable = _qzz_reachable; suppressed = _qzz_suppressed; }
17658#define VALGRIND_COUNT_LEAK_BLOCKS(leaked,dubious,reachable,suppressed) { unsigned long _qzz_leaked = 0, _qzz_dubious = 0; unsigned long _qzz_reachable = 0, _qzz_suppressed = 0; VALGRIND_DO_CLIENT_REQUEST_STMT( VG_USERREQ__COUNT_LEAK_BLOCKS, &_qzz_leaked, &_qzz_dubious, &_qzz_reachable, &_qzz_suppressed, 0); leaked = _qzz_leaked; dubious = _qzz_dubious; reachable = _qzz_reachable; suppressed = _qzz_suppressed; }
17659#define VALGRIND_GET_VBITS(zza,zzvbits,zznbytes) (unsigned)VALGRIND_DO_CLIENT_REQUEST_EXPR(0, VG_USERREQ__GET_VBITS, (const char*)(zza), (char*)(zzvbits), (zznbytes), 0, 0)
17660#define VALGRIND_SET_VBITS(zza,zzvbits,zznbytes) (unsigned)VALGRIND_DO_CLIENT_REQUEST_EXPR(0, VG_USERREQ__SET_VBITS, (const char*)(zza), (const char*)(zzvbits), (zznbytes), 0, 0 )
17661#define VALGRIND_DISABLE_ADDR_ERROR_REPORTING_IN_RANGE(_qzz_addr,_qzz_len) VALGRIND_DO_CLIENT_REQUEST_EXPR(0 , VG_USERREQ__DISABLE_ADDR_ERROR_REPORTING_IN_RANGE, (_qzz_addr), (_qzz_len), 0, 0, 0)
17662#define VALGRIND_ENABLE_ADDR_ERROR_REPORTING_IN_RANGE(_qzz_addr,_qzz_len) VALGRIND_DO_CLIENT_REQUEST_EXPR(0 , VG_USERREQ__ENABLE_ADDR_ERROR_REPORTING_IN_RANGE, (_qzz_addr), (_qzz_len), 0, 0, 0)
17663#define numberof(array) ((int)(sizeof(array) / sizeof((array)[0])))
17664#define __has_feature(x) 0
17665#define __has_extension __has_feature
17666#define ACCESS_ONCE(type,x) (*((volatile type *)&(x)))
17667#define STATIC_ASSERT(name,expr) RB_GNUC_EXTENSION _Static_assert(expr, #name ": " #expr)
17668#define SIGNED_INTEGER_TYPE_P(int_type) (0 > ((int_type)0)-1)
17669#define SIGNED_INTEGER_MAX(sint_type) (sint_type) ((((sint_type)1) << (sizeof(sint_type) * CHAR_BIT - 2)) | ((((sint_type)1) << (sizeof(sint_type) * CHAR_BIT - 2)) - 1))
17670#define SIGNED_INTEGER_MIN(sint_type) (-SIGNED_INTEGER_MAX(sint_type)-1)
17671#define UNSIGNED_INTEGER_MAX(uint_type) (~(uint_type)0)
17672#define TIMET_MAX SIGNED_INTEGER_MAX(time_t)
17673#define TIMET_MIN SIGNED_INTEGER_MIN(time_t)
17674#define TIMET_MAX_PLUS_ONE (2*(double)(TIMET_MAX/2+1))
17675#define MUL_OVERFLOW_P(a,b) __builtin_mul_overflow_p((a), (b), (__typeof__(a * b))0)
17676#define MUL_OVERFLOW_SIGNED_INTEGER_P(a,b,min,max) ( (a) == 0 ? 0 : (a) == -1 ? (b) < -(max) : (a) > 0 ? ((b) > 0 ? (max) / (a) < (b) : (min) / (a) > (b)) : ((b) > 0 ? (min) / (a) < (b) : (max) / (a) > (b)))
17677#define MUL_OVERFLOW_FIXNUM_P(a,b) RB_GNUC_EXTENSION_BLOCK( struct { long fixnum : SIZEOF_LONG * CHAR_BIT - 1; } c; __builtin_mul_overflow_p((a), (b), c.fixnum); )
17678#define MUL_OVERFLOW_LONG_LONG_P(a,b) MUL_OVERFLOW_P(a, b)
17679#define MUL_OVERFLOW_LONG_P(a,b) MUL_OVERFLOW_P(a, b)
17680#define MUL_OVERFLOW_INT_P(a,b) MUL_OVERFLOW_P(a, b)
17681#define swap16(x) __builtin_bswap16(x)
17682#define swap32(x) __builtin_bswap32(x)
17683#define swap64(x) __builtin_bswap64(x)
17684#define DLONG int128_t
17685#define DL2NUM(x) (RB_FIXABLE(x) ? LONG2FIX(x) : rb_int128t2big(x))
17686#define bit_length(x) (unsigned int) (sizeof(x) <= SIZEOF_INT ? SIZEOF_INT * CHAR_BIT - nlz_int((unsigned int)(x)) : sizeof(x) <= SIZEOF_LONG ? SIZEOF_LONG * CHAR_BIT - nlz_long((unsigned long)(x)) : sizeof(x) <= SIZEOF_LONG_LONG ? SIZEOF_LONG_LONG * CHAR_BIT - nlz_long_long((unsigned LONG_LONG)(x)) : SIZEOF_INT128_T * CHAR_BIT - nlz_int128((uint128_t)(x)))
17687#define BDIGIT unsigned int
17688#define SIZEOF_BDIGIT SIZEOF_INT
17689#define BDIGIT_DBL unsigned LONG_LONG
17690#define BDIGIT_DBL_SIGNED LONG_LONG
17691#define PRI_BDIGIT_PREFIX ""
17692#define PRI_BDIGIT_DBL_PREFIX PRI_LL_PREFIX
17693#define SIZEOF_ACTUAL_BDIGIT SIZEOF_BDIGIT
17694#define PRIdBDIGIT PRI_BDIGIT_PREFIX"d"
17695#define PRIiBDIGIT PRI_BDIGIT_PREFIX"i"
17696#define PRIoBDIGIT PRI_BDIGIT_PREFIX"o"
17697#define PRIuBDIGIT PRI_BDIGIT_PREFIX"u"
17698#define PRIxBDIGIT PRI_BDIGIT_PREFIX"x"
17699#define PRIXBDIGIT PRI_BDIGIT_PREFIX"X"
17700#define PRIdBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"d"
17701#define PRIiBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"i"
17702#define PRIoBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"o"
17703#define PRIuBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"u"
17704#define PRIxBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"x"
17705#define PRIXBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"X"
17706#define BIGNUM_EMBED_LEN_NUMBITS 3
17707#define BIGNUM_EMBED_LEN_MAX (SIZEOF_VALUE*3/SIZEOF_ACTUAL_BDIGIT)
17708#define BIGNUM_SIGN_BIT ((VALUE)FL_USER1)
17709#define BIGNUM_SIGN(b) ((RBASIC(b)->flags & BIGNUM_SIGN_BIT) != 0)
17710#define BIGNUM_SET_SIGN(b,sign) ((sign) ? (RBASIC(b)->flags |= BIGNUM_SIGN_BIT) : (RBASIC(b)->flags &= ~BIGNUM_SIGN_BIT))
17711#define BIGNUM_POSITIVE_P(b) BIGNUM_SIGN(b)
17712#define BIGNUM_NEGATIVE_P(b) (!BIGNUM_SIGN(b))
17713#define BIGNUM_NEGATE(b) (RBASIC(b)->flags ^= BIGNUM_SIGN_BIT)
17714#define BIGNUM_EMBED_FLAG ((VALUE)FL_USER2)
17715#define BIGNUM_EMBED_LEN_MASK (~(~(VALUE)0U << BIGNUM_EMBED_LEN_NUMBITS) << BIGNUM_EMBED_LEN_SHIFT)
17716#define BIGNUM_EMBED_LEN_SHIFT (FL_USHIFT+3)
17717#define BIGNUM_LEN(b) ((RBASIC(b)->flags & BIGNUM_EMBED_FLAG) ? (size_t)((RBASIC(b)->flags >> BIGNUM_EMBED_LEN_SHIFT) & (BIGNUM_EMBED_LEN_MASK >> BIGNUM_EMBED_LEN_SHIFT)) : RBIGNUM(b)->as.heap.len)
17718#define BIGNUM_DIGITS(b) ((RBASIC(b)->flags & BIGNUM_EMBED_FLAG) ? RBIGNUM(b)->as.ary : RBIGNUM(b)->as.heap.digits)
17719#define BIGNUM_LENINT(b) rb_long2int(BIGNUM_LEN(b))
17720#define RBIGNUM(obj) (R_CAST(RBignum)(obj))
17721#define RRATIONAL(obj) (R_CAST(RRational)(obj))
17722#define RRATIONAL_SET_NUM(rat,n) RB_OBJ_WRITE((rat), &((struct RRational *)(rat))->num,(n))
17723#define RRATIONAL_SET_DEN(rat,d) RB_OBJ_WRITE((rat), &((struct RRational *)(rat))->den,(d))
17724#define RFLOAT(obj) (R_CAST(RFloat)(obj))
17725#define RCOMPLEX(obj) (R_CAST(RComplex)(obj))
17726#define RCOMPLEX_SET_REAL(cmp,r) RB_OBJ_WRITE((cmp), &((struct RComplex *)(cmp))->real,(r))
17727#define RCOMPLEX_SET_IMAG(cmp,i) RB_OBJ_WRITE((cmp), &((struct RComplex *)(cmp))->imag,(i))
17728#define HASH_PROC_DEFAULT FL_USER2
17729#define RHASH_AR_TABLE_SIZE_RAW(h) ((unsigned int)((RBASIC(h)->flags & RHASH_AR_TABLE_SIZE_MASK) >> RHASH_AR_TABLE_SIZE_SHIFT))
17730#define RHASH_AR_TABLE_P(hash) (!FL_TEST_RAW((hash), RHASH_ST_TABLE_FLAG))
17731#define RHASH_AR_TABLE(hash) (RHASH(hash)->as.ar)
17732#define RHASH_ST_TABLE(hash) (RHASH(hash)->as.st)
17733#define RHASH(obj) (R_CAST(RHash)(obj))
17734#define RHASH_ST_SIZE(h) (RHASH_ST_TABLE(h)->num_entries)
17735#define RHASH_ST_TABLE_P(h) (!RHASH_AR_TABLE_P(h))
17736#define RHASH_ST_CLEAR(h) (FL_UNSET_RAW(h, RHASH_ST_TABLE_FLAG), RHASH(h)->as.ar = NULL)
17737#define RHASH_AR_TABLE_SIZE_MASK (VALUE)RHASH_AR_TABLE_SIZE_MASK
17738#define RHASH_AR_TABLE_SIZE_SHIFT RHASH_AR_TABLE_SIZE_SHIFT
17739#define RHASH_AR_TABLE_BOUND_MASK (VALUE)RHASH_AR_TABLE_BOUND_MASK
17740#define RHASH_AR_TABLE_BOUND_SHIFT RHASH_AR_TABLE_BOUND_SHIFT
17741#define RHASH_TRANSIENT_FLAG FL_USER14
17742#define RHASH_TRANSIENT_P(hash) FL_TEST_RAW((hash), RHASH_TRANSIENT_FLAG)
17743#define RHASH_SET_TRANSIENT_FLAG(h) FL_SET_RAW(h, RHASH_TRANSIENT_FLAG)
17744#define RHASH_UNSET_TRANSIENT_FLAG(h) FL_UNSET_RAW(h, RHASH_TRANSIENT_FLAG)
17745#define RHASH_AR_TABLE_MAX_SIZE 8
17746#define RHASH_AR_TABLE_MAX_BOUND RHASH_AR_TABLE_MAX_SIZE
17747#undef RHASH_ITER_LEV
17748#undef RHASH_IFNONE
17749#undef RHASH_SIZE
17750#define RHASH_ITER_LEV(h) (RHASH(h)->iter_lev)
17751#define RHASH_IFNONE(h) (RHASH(h)->ifnone)
17752#define RHASH_SIZE(h) (RHASH_AR_TABLE_P(h) ? RHASH_AR_TABLE_SIZE_RAW(h) : RHASH_ST_SIZE(h))
17753#define RSTRUCT_EMBED_LEN_MAX RSTRUCT_EMBED_LEN_MAX
17754#define RSTRUCT_EMBED_LEN_MASK RSTRUCT_EMBED_LEN_MASK
17755#define RSTRUCT_EMBED_LEN_SHIFT RSTRUCT_EMBED_LEN_SHIFT
17756#define RSTRUCT_TRANSIENT_P(st) FL_TEST_RAW((obj), RSTRUCT_TRANSIENT_FLAG)
17757#define RSTRUCT_TRANSIENT_SET(st) FL_SET_RAW((st), RSTRUCT_TRANSIENT_FLAG)
17758#define RSTRUCT_TRANSIENT_UNSET(st) FL_UNSET_RAW((st), RSTRUCT_TRANSIENT_FLAG)
17759#undef RSTRUCT_LEN
17760#undef RSTRUCT_PTR
17761#undef RSTRUCT_SET
17762#undef RSTRUCT_GET
17763#define RSTRUCT_EMBED_LEN(st) (long)((RBASIC(st)->flags >> RSTRUCT_EMBED_LEN_SHIFT) & (RSTRUCT_EMBED_LEN_MASK >> RSTRUCT_EMBED_LEN_SHIFT))
17764#define RSTRUCT_LEN(st) rb_struct_len(st)
17765#define RSTRUCT_LENINT(st) rb_long2int(RSTRUCT_LEN(st))
17766#define RSTRUCT_CONST_PTR(st) rb_struct_const_ptr(st)
17767#define RSTRUCT_PTR(st) ((VALUE *)RSTRUCT_CONST_PTR(RB_OBJ_WB_UNPROTECT_FOR(STRUCT, st)))
17768#define RSTRUCT_SET(st,idx,v) RB_OBJ_WRITE(st, &RSTRUCT_CONST_PTR(st)[idx], (v))
17769#define RSTRUCT_GET(st,idx) (RSTRUCT_CONST_PTR(st)[idx])
17770#define RSTRUCT(obj) (R_CAST(RStruct)(obj))
17771#define SERIALT2NUM ULL2NUM
17772#define PRI_SERIALT_PREFIX PRI_LL_PREFIX
17773#undef RClass
17774#define RCLASS_EXT(c) (RCLASS(c)->ptr)
17775#define RCLASS_IV_TBL(c) (RCLASS_EXT(c)->iv_tbl)
17776#define RCLASS_CONST_TBL(c) (RCLASS_EXT(c)->const_tbl)
17777#define RCLASS_M_TBL(c) (RCLASS(c)->m_tbl)
17778#define RCLASS_CALLABLE_M_TBL(c) (RCLASS_EXT(c)->callable_m_tbl)
17779#define RCLASS_IV_INDEX_TBL(c) (RCLASS_EXT(c)->iv_index_tbl)
17780#define RCLASS_ORIGIN(c) (RCLASS_EXT(c)->origin_)
17781#define RCLASS_REFINED_CLASS(c) (RCLASS_EXT(c)->refined_class)
17782#define RCLASS_SERIAL(c) (RCLASS_EXT(c)->class_serial)
17783#define RICLASS_IS_ORIGIN FL_USER5
17784#undef RCLASS_SUPER
17785#define IMEMO_DEBUG 0
17786#define IMEMO_MASK 0x0f
17787#define IMEMO_FL_USHIFT (FL_USHIFT + 4)
17788#define IMEMO_FL_USER0 FL_USER4
17789#define IMEMO_FL_USER1 FL_USER5
17790#define IMEMO_FL_USER2 FL_USER6
17791#define IMEMO_FL_USER3 FL_USER7
17792#define IMEMO_FL_USER4 FL_USER8
17793#define THROW_DATA_CONSUMED IMEMO_FL_USER0
17794#define THROW_DATA_P(err) RB_TYPE_P((VALUE)(err), T_IMEMO)
17795#define IFUNC_NEW(a,b,c) ((struct vm_ifunc *)rb_imemo_new(imemo_ifunc, (VALUE)(a), (VALUE)(b), (VALUE)(c), 0))
17796#define RB_IMEMO_TMPBUF_PTR(v) ((void *)(((const struct rb_imemo_tmpbuf_struct *)(v))->ptr))
17797#define MEMO_V1_SET(m,v) RB_OBJ_WRITE((m), &(m)->v1, (v))
17798#define MEMO_V2_SET(m,v) RB_OBJ_WRITE((m), &(m)->v2, (v))
17799#define MEMO_CAST(m) ((struct MEMO *)m)
17800#define MEMO_NEW(a,b,c) ((struct MEMO *)rb_imemo_new(imemo_memo, (VALUE)(a), (VALUE)(b), (VALUE)(c), 0))
17801#define roomof(x,y) (((x) + (y) - 1) / (y))
17802#define type_roomof(x,y) roomof(sizeof(x), sizeof(y))
17803#define MEMO_FOR(type,value) ((type *)RARRAY_PTR(value))
17804#define NEW_MEMO_FOR(type,value) ((value) = rb_ary_tmp_new_fill(type_roomof(type, VALUE)), MEMO_FOR(type, value))
17805#define NEW_PARTIAL_MEMO_FOR(type,value,member) ((value) = rb_ary_tmp_new_fill(type_roomof(type, VALUE)), rb_ary_set_len((value), offsetof(type, member) / sizeof(VALUE)), MEMO_FOR(type, value))
17806#define STRING_P(s) (RB_TYPE_P((s), T_STRING) && CLASS_OF(s) == rb_cString)
17807#define rb_cFixnum rb_cInteger
17808#define rb_cBignum rb_cInteger
17809#define NEW_CMP_OPT_MEMO(type,value) NEW_PARTIAL_MEMO_FOR(type, value, cmp_opt)
17810#define CMP_OPTIMIZABLE_BIT(type) (1U << TOKEN_PASTE(cmp_opt_,type))
17811#define CMP_OPTIMIZABLE(data,type) (((data).opt_inited & CMP_OPTIMIZABLE_BIT(type)) ? ((data).opt_methods & CMP_OPTIMIZABLE_BIT(type)) : (((data).opt_inited |= CMP_OPTIMIZABLE_BIT(type)), rb_method_basic_definition_p(TOKEN_PASTE(rb_c,type), id_cmp) && ((data).opt_methods |= CMP_OPTIMIZABLE_BIT(type))))
17812#define OPTIMIZED_CMP(a,b,data) ((FIXNUM_P(a) && FIXNUM_P(b) && CMP_OPTIMIZABLE(data, Fixnum)) ? (((long)a > (long)b) ? 1 : ((long)a < (long)b) ? -1 : 0) : (STRING_P(a) && STRING_P(b) && CMP_OPTIMIZABLE(data, String)) ? rb_str_cmp(a, b) : (RB_FLOAT_TYPE_P(a) && RB_FLOAT_TYPE_P(b) && CMP_OPTIMIZABLE(data, Float)) ? rb_float_cmp(a, b) : rb_cmpint(rb_funcallv(a, id_cmp, 1, &b), a, b))
17813#define ARRAY_DEBUG 0
17814#define RARRAY_PTR_IN_USE_FLAG FL_USER14
17815#define ARY_PTR_USING_P(ary) FL_TEST_RAW((ary), RARRAY_PTR_IN_USE_FLAG)
17816#define RARY_TRANSIENT_SET(ary) FL_SET_RAW((ary), RARRAY_TRANSIENT_FLAG);
17817#define RARY_TRANSIENT_UNSET(ary) FL_UNSET_RAW((ary), RARRAY_TRANSIENT_FLAG);
17818#define rb_ary_new_from_args(n,...) __extension__ ({ const VALUE args_to_new_ary[] = {__VA_ARGS__}; if (__builtin_constant_p(n)) { STATIC_ASSERT(rb_ary_new_from_args, numberof(args_to_new_ary) == (n)); } rb_ary_new_from_values(numberof(args_to_new_ary), args_to_new_ary); })
17819#define rb_raise_cstr(etype,mesg) rb_exc_raise(rb_exc_new_str(etype, rb_str_new_cstr(mesg)))
17820#define rb_raise_static(etype,mesg) rb_exc_raise(rb_exc_new_str(etype, rb_str_new_static(mesg, rb_strlen_lit(mesg))))
17821#define rb_name_err_raise_str(mesg,recv,name) rb_exc_raise(rb_name_err_new(mesg, recv, name))
17822#define rb_name_err_raise(mesg,recv,name) rb_name_err_raise_str(rb_fstring_cstr(mesg), (recv), (name))
17823#define rb_key_err_raise(mesg,recv,name) rb_exc_raise(rb_key_err_new(mesg, recv, name))
17824#define DEPRECATED_INTERNAL_FEATURE(func) (ruby_deprecated_internal_feature(func), UNREACHABLE)
17825#define id_signo ruby_static_id_signo
17826#define id_status ruby_static_id_status
17827#pragma GCC visibility push(default)
17828#pragma GCC visibility pop
17829#define rb_sys_fail_path(path) rb_sys_fail_path_in(RUBY_FUNCTION_NAME_STRING, path)
17830#define rb_syserr_fail_path(err,path) rb_syserr_fail_path_in(RUBY_FUNCTION_NAME_STRING, (err), (path))
17831#define ruby_sized_xrealloc(ptr,new_size,old_size) ruby_xrealloc(ptr, new_size)
17832#define ruby_sized_xrealloc2(ptr,new_count,element_size,old_count) ruby_xrealloc(ptr, new_count, element_size)
17833#define ruby_sized_xfree(ptr,size) ruby_xfree(ptr)
17834#define SIZED_REALLOC_N(var,type,n,old_n) REALLOC_N(var, type, n)
17835#undef NEWOBJF_OF
17836#undef RB_NEWOBJ_OF
17837#define RB_NEWOBJ_OF(obj,type,klass,flags) type *(obj) = (type*)(((flags) & FL_WB_PROTECTED) ? rb_wb_protected_newobj_of(klass, (flags) & ~FL_WB_PROTECTED) : rb_wb_unprotected_newobj_of(klass, flags))
17838#define NEWOBJ_OF(obj,type,klass,flags) RB_NEWOBJ_OF(obj,type,klass,flags)
17839#define RHASH_TBL_RAW(h) rb_hash_tbl_raw(h)
17840#pragma GCC visibility push(default)
17841#pragma GCC visibility pop
17842#define rb_io_fptr_finalize rb_io_fptr_finalize_internal
17843#define FIXNUM_POSITIVE_P(num) ((SIGNED_VALUE)(num) > (SIGNED_VALUE)INT2FIX(0))
17844#define FIXNUM_NEGATIVE_P(num) ((SIGNED_VALUE)(num) < 0)
17845#define FIXNUM_ZERO_P(num) ((num) == INT2FIX(0))
17846#define INT_NEGATIVE_P(x) (FIXNUM_P(x) ? FIXNUM_NEGATIVE_P(x) : BIGNUM_NEGATIVE_P(x))
17847#define ROUND_DEFAULT RUBY_NUM_ROUND_HALF_UP
17848#define ROUND_TO(mode,even,up,down) ((mode) == RUBY_NUM_ROUND_HALF_EVEN ? even : (mode) == RUBY_NUM_ROUND_HALF_UP ? up : down)
17849#define ROUND_FUNC(mode,name) ROUND_TO(mode, name ##_half_even, name ##_half_up, name ##_half_down)
17850#define ROUND_CALL(mode,name,args) ROUND_TO(mode, name ##_half_even args, name ##_half_up args, name ##_half_down args)
17851#define RUBY_BIT_ROTL(v,n) (((v) << (n)) | ((v) >> ((sizeof(v) * 8) - n)))
17852#define RUBY_BIT_ROTR(v,n) (((v) >> (n)) | ((v) << ((sizeof(v) * 8) - n)))
17853#define rb_float_value(v) rb_float_value_inline(v)
17854#define rb_float_new(d) rb_float_new_inline(d)
17855#define RBASIC_CLEAR_CLASS(obj) memset(&(((struct RBasicRaw *)((VALUE)(obj)))->klass), 0, sizeof(VALUE))
17856#define RBASIC_SET_CLASS_RAW(obj,cls) memcpy(&((struct RBasicRaw *)((VALUE)(obj)))->klass, &(cls), sizeof(VALUE))
17857#define RBASIC_SET_CLASS(obj,cls) do { VALUE _obj_ = (obj); RB_OBJ_WRITE(_obj_, &((struct RBasicRaw *)(_obj_))->klass, cls); } while (0)
17858#define USE_SYMBOL_GC 1
17859#pragma GCC visibility push(default)
17860#pragma GCC visibility pop
17861#define RB_MAX_GROUPS (65536)
17862#define ARGVSTR2ARGV(argv_str) ((char **)RB_IMEMO_TMPBUF_PTR(argv_str) + 1)
17863#define RANGE_BEG(r) (RSTRUCT(r)->as.ary[0])
17864#define RANGE_END(r) (RSTRUCT(r)->as.ary[1])
17865#define RANGE_EXCL(r) (RSTRUCT(r)->as.ary[2])
17866#define rb_fstring_lit(str) rb_fstring_new((str), rb_strlen_lit(str))
17867#define rb_fstring_literal(str) rb_fstring_lit(str)
17868#define rb_fstring_cstr(str) RB_GNUC_EXTENSION_BLOCK( (__builtin_constant_p(str)) ? rb_fstring_new((str), (long)strlen(str)) : rb_fstring_cstr(str) )
17869#define QUOTE(str) rb_str_quote_unprintable(str)
17870#define QUOTE_ID(id) rb_id_quote_unprintable(id)
17871#define STR_NOEMBED FL_USER1
17872#define STR_SHARED FL_USER2
17873#define STR_EMBED_P(str) (!FL_TEST_RAW((str), STR_NOEMBED))
17874#define STR_SHARED_P(s) FL_ALL_RAW((s), STR_NOEMBED|ELTS_SHARED)
17875#define is_ascii_string(str) (rb_enc_str_coderange(str) == ENC_CODERANGE_7BIT)
17876#define is_broken_string(str) (rb_enc_str_coderange(str) == ENC_CODERANGE_BROKEN)
17877#define rb_sym_intern_ascii_cstr(ptr) __extension__ ( { (__builtin_constant_p(ptr)) ? rb_sym_intern_ascii((ptr), (long)strlen(ptr)) : rb_sym_intern_ascii_cstr(ptr); })
17878#define COVERAGE_INDEX_LINES 0
17879#define COVERAGE_INDEX_BRANCHES 1
17880#define COVERAGE_TARGET_LINES 1
17881#define COVERAGE_TARGET_BRANCHES 2
17882#define COVERAGE_TARGET_METHODS 4
17883#define COVERAGE_TARGET_ONESHOT_LINES 8
17884#define ROBJECT_TRANSIENT_FLAG FL_USER13
17885#define ROBJ_TRANSIENT_P(obj) FL_TEST_RAW((obj), ROBJECT_TRANSIENT_FLAG)
17886#define ROBJ_TRANSIENT_SET(obj) FL_SET_RAW((obj), ROBJECT_TRANSIENT_FLAG)
17887#define ROBJ_TRANSIENT_UNSET(obj) FL_UNSET_RAW((obj), ROBJECT_TRANSIENT_FLAG)
17888#pragma GCC visibility push(default)
17889#undef Check_Type
17890#define Check_Type(v,t) (!RB_TYPE_P((VALUE)(v), (t)) || ((t) == RUBY_T_DATA && RTYPEDDATA_P(v)) ? rb_unexpected_type((VALUE)(v), (t)) : (void)0)
17891#define rb_typeddata_is_instance_of rb_typeddata_is_instance_of_inline
17892#define RB_OBJ_GC_FLAGS_MAX 5
17893#pragma GCC visibility pop
17894#define RUBY_DTRACE_CREATE_HOOK(name,arg) RUBY_DTRACE_HOOK(name ##_CREATE, arg)
17895#define RUBY_DTRACE_HOOK(name,arg) do { if (UNLIKELY(RUBY_DTRACE_ ##name ##_ENABLED())) { int dtrace_line; const char *dtrace_file = rb_source_location_cstr(&dtrace_line); if (!dtrace_file) dtrace_file = ""; RUBY_DTRACE_ ##name(arg, dtrace_file, dtrace_line); } } while (0)
17896#define RB_OBJ_BUILTIN_TYPE(obj) rb_obj_builtin_type(obj)
17897#define OBJ_BUILTIN_TYPE(obj) RB_OBJ_BUILTIN_TYPE(obj)
17898#define rb_obj_builtin_type(obj) __extension__({ VALUE arg_obj = (obj); RB_SPECIAL_CONST_P(arg_obj) ? -1 : RB_BUILTIN_TYPE(arg_obj); })
17899#define FLEX_ARY_LEN
17900#define BITFIELD(type,name,size) type name : size
17901#define COMPILER_WARNING_PUSH _Pragma("GCC diagnostic push")
17902#define COMPILER_WARNING_POP _Pragma("GCC diagnostic pop")
17903#define COMPILER_WARNING_SPECIFIER(kind,msg) GCC diagnostic kind #msg
17904#define COMPILER_WARNING_ERROR(flag) COMPILER_WARNING_PRAGMA(COMPILER_WARNING_SPECIFIER(error, flag))
17905#define COMPILER_WARNING_IGNORED(flag) COMPILER_WARNING_PRAGMA(COMPILER_WARNING_SPECIFIER(ignored, flag))
17906#define COMPILER_WARNING_PRAGMA(str) COMPILER_WARNING_PRAGMA_(str)
17907#define COMPILER_WARNING_PRAGMA_(str) _Pragma(#str)
17908#define RUBY_VM_H 1
17909#pragma GCC visibility push(default)
17910#pragma GCC visibility pop
17911#define vm_exec rb_vm_exec
17912#define RUBY_GC_H 1
17913#define SET_MACHINE_STACK_END(p) __asm__ __volatile__ ("movq\t%%rsp, %0" : "=r" (*(p)))
17914#define RUBY_MARK_FREE_DEBUG 0
17915#define RUBY_MARK_ENTER(msg)
17916#define RUBY_MARK_LEAVE(msg)
17917#define RUBY_FREE_ENTER(msg)
17918#define RUBY_FREE_LEAVE(msg)
17919#define RUBY_GC_INFO if(0)printf
17920#define RUBY_MARK_UNLESS_NULL(ptr) do { VALUE markobj = (ptr); if (RTEST(markobj)) {rb_gc_mark(markobj);} } while (0)
17921#define RUBY_FREE_UNLESS_NULL(ptr) if(ptr){ruby_xfree(ptr);(ptr)=NULL;}
17922#define STACK_UPPER(x,a,b) (b)
17923#define STACK_GROW_DIR_DETECTION
17924#define STACK_DIR_UPPER(a,b) STACK_UPPER(0, (a), (b))
17925#define IS_STACK_DIR_UPPER() STACK_DIR_UPPER(1,0)
17926#pragma GCC visibility push(default)
17927#pragma GCC visibility pop
17928#define RUBY_VM_CORE_H
17929#define VM_CHECK_MODE 0
17930#define VMDEBUG 0
17931#define RUBY_ASSERT_H
17932#define RUBY_ASSERT_FAIL(expr) rb_assert_failure(__FILE__, __LINE__, RUBY_FUNCTION_NAME_STRING, expr)
17933#define RUBY_ASSERT_MESG(expr,mesg) ((expr) ? (void)0 : RUBY_ASSERT_FAIL(mesg))
17934#define RUBY_ASSERT_MESG_WHEN(cond,expr,mesg) __builtin_choose_expr( __builtin_constant_p(cond), __builtin_choose_expr(cond, RUBY_ASSERT_MESG(expr, mesg), (void)0), RUBY_ASSERT_MESG(!(cond) || (expr), mesg))
17935#define RUBY_ASSERT(expr) RUBY_ASSERT_MESG_WHEN(!RUBY_NDEBUG+0, expr, #expr)
17936#define RUBY_ASSERT_WHEN(cond,expr) RUBY_ASSERT_MESG_WHEN(cond, expr, #expr)
17937#undef assert
17938#define assert RUBY_ASSERT
17939#define RUBY_NDEBUG 0
17940#define VM_ASSERT(expr) ((void)0)
17941#define VM_UNREACHABLE(func) UNREACHABLE
17942#define RUBY_VM_THREAD_MODEL 2
17943#define VM_INSN_INFO_TABLE_IMPL 2
17944#define RUBY_NODE_H 1
17945#define RNODE(obj) (R_CAST(RNode)(obj))
17946#define NODE_FL_NEWLINE (((VALUE)1)<<7)
17947#define NODE_TYPESHIFT 8
17948#define NODE_TYPEMASK (((VALUE)0x7f)<<NODE_TYPESHIFT)
17949#define nd_type(n) ((int) (((n)->flags & NODE_TYPEMASK)>>NODE_TYPESHIFT))
17950#define nd_set_type(n,t) (n)->flags=(((n)->flags&~NODE_TYPEMASK)|((((unsigned long)(t))<<NODE_TYPESHIFT)&NODE_TYPEMASK))
17951#define NODE_LSHIFT (NODE_TYPESHIFT+7)
17952#define NODE_LMASK (((SIGNED_VALUE)1<<(sizeof(VALUE)*CHAR_BIT-NODE_LSHIFT))-1)
17953#define nd_line(n) (int)(((SIGNED_VALUE)(n)->flags)>>NODE_LSHIFT)
17954#define nd_set_line(n,l) (n)->flags=(((n)->flags&~((VALUE)(-1)<<NODE_LSHIFT))|((VALUE)((l)&NODE_LMASK)<<NODE_LSHIFT))
17955#define nd_first_column(n) ((int)((n)->nd_loc.beg_pos.column))
17956#define nd_set_first_column(n,v) ((n)->nd_loc.beg_pos.column = (v))
17957#define nd_first_lineno(n) ((int)((n)->nd_loc.beg_pos.lineno))
17958#define nd_set_first_lineno(n,v) ((n)->nd_loc.beg_pos.lineno = (v))
17959#define nd_first_loc(n) ((n)->nd_loc.beg_pos)
17960#define nd_set_first_loc(n,v) (nd_first_loc(n) = (v))
17961#define nd_last_column(n) ((int)((n)->nd_loc.end_pos.column))
17962#define nd_set_last_column(n,v) ((n)->nd_loc.end_pos.column = (v))
17963#define nd_last_lineno(n) ((int)((n)->nd_loc.end_pos.lineno))
17964#define nd_set_last_lineno(n,v) ((n)->nd_loc.end_pos.lineno = (v))
17965#define nd_last_loc(n) ((n)->nd_loc.end_pos)
17966#define nd_set_last_loc(n,v) (nd_last_loc(n) = (v))
17967#define nd_node_id(n) ((n)->node_id)
17968#define nd_set_node_id(n,id) ((n)->node_id = (id))
17969#define nd_head u1.node
17970#define nd_alen u2.argc
17971#define nd_next u3.node
17972#define nd_cond u1.node
17973#define nd_body u2.node
17974#define nd_else u3.node
17975#define nd_resq u2.node
17976#define nd_ensr u3.node
17977#define nd_1st u1.node
17978#define nd_2nd u2.node
17979#define nd_stts u1.node
17980#define nd_entry u3.entry
17981#define nd_vid u1.id
17982#define nd_cflag u2.id
17983#define nd_cval u3.value
17984#define nd_oid u1.id
17985#define nd_tbl u1.tbl
17986#define nd_var u1.node
17987#define nd_iter u3.node
17988#define nd_value u2.node
17989#define nd_aid u3.id
17990#define nd_lit u1.value
17991#define nd_rest u1.id
17992#define nd_opt u1.node
17993#define nd_pid u1.id
17994#define nd_plen u2.argc
17995#define nd_recv u1.node
17996#define nd_mid u2.id
17997#define nd_args u3.node
17998#define nd_ainfo u3.args
17999#define nd_defn u3.node
18000#define nd_cpath u1.node
18001#define nd_super u3.node
18002#define nd_beg u1.node
18003#define nd_end u2.node
18004#define nd_state u3.state
18005#define nd_rval u2.value
18006#define nd_nth u2.argc
18007#define nd_tag u1.id
18008#define nd_alias u1.id
18009#define nd_orig u2.id
18010#define nd_undef u2.node
18011#define NEW_NODE(t,a0,a1,a2,loc) rb_node_newnode((t),(VALUE)(a0),(VALUE)(a1),(VALUE)(a2),loc)
18012#define NEW_DEFN(i,a,d,loc) NEW_NODE(NODE_DEFN,0,i,NEW_SCOPE(a,d,loc),loc)
18013#define NEW_DEFS(r,i,a,d,loc) NEW_NODE(NODE_DEFS,r,i,NEW_SCOPE(a,d,loc),loc)
18014#define NEW_SCOPE(a,b,loc) NEW_NODE(NODE_SCOPE,local_tbl(p),b,a,loc)
18015#define NEW_BLOCK(a,loc) NEW_NODE(NODE_BLOCK,a,0,0,loc)
18016#define NEW_IF(c,t,e,loc) NEW_NODE(NODE_IF,c,t,e,loc)
18017#define NEW_UNLESS(c,t,e,loc) NEW_NODE(NODE_UNLESS,c,t,e,loc)
18018#define NEW_CASE(h,b,loc) NEW_NODE(NODE_CASE,h,b,0,loc)
18019#define NEW_CASE2(b,loc) NEW_NODE(NODE_CASE2,0,b,0,loc)
18020#define NEW_WHEN(c,t,e,loc) NEW_NODE(NODE_WHEN,c,t,e,loc)
18021#define NEW_WHILE(c,b,n,loc) NEW_NODE(NODE_WHILE,c,b,n,loc)
18022#define NEW_UNTIL(c,b,n,loc) NEW_NODE(NODE_UNTIL,c,b,n,loc)
18023#define NEW_FOR(i,b,loc) NEW_NODE(NODE_FOR,0,b,i,loc)
18024#define NEW_FOR_MASGN(v,loc) NEW_NODE(NODE_FOR_MASGN,v,0,0,loc)
18025#define NEW_ITER(a,b,loc) NEW_NODE(NODE_ITER,0,NEW_SCOPE(a,b,loc),0,loc)
18026#define NEW_LAMBDA(a,b,loc) NEW_NODE(NODE_LAMBDA,0,NEW_SCOPE(a,b,loc),0,loc)
18027#define NEW_BREAK(s,loc) NEW_NODE(NODE_BREAK,s,0,0,loc)
18028#define NEW_NEXT(s,loc) NEW_NODE(NODE_NEXT,s,0,0,loc)
18029#define NEW_REDO(loc) NEW_NODE(NODE_REDO,0,0,0,loc)
18030#define NEW_RETRY(loc) NEW_NODE(NODE_RETRY,0,0,0,loc)
18031#define NEW_BEGIN(b,loc) NEW_NODE(NODE_BEGIN,0,b,0,loc)
18032#define NEW_RESCUE(b,res,e,loc) NEW_NODE(NODE_RESCUE,b,res,e,loc)
18033#define NEW_RESBODY(a,ex,n,loc) NEW_NODE(NODE_RESBODY,n,ex,a,loc)
18034#define NEW_ENSURE(b,en,loc) NEW_NODE(NODE_ENSURE,b,0,en,loc)
18035#define NEW_RETURN(s,loc) NEW_NODE(NODE_RETURN,s,0,0,loc)
18036#define NEW_YIELD(a,loc) NEW_NODE(NODE_YIELD,a,0,0,loc)
18037#define NEW_LIST(a,loc) NEW_ARRAY(a,loc)
18038#define NEW_ARRAY(a,loc) NEW_NODE(NODE_ARRAY,a,1,0,loc)
18039#define NEW_ZARRAY(loc) NEW_NODE(NODE_ZARRAY,0,0,0,loc)
18040#define NEW_HASH(a,loc) NEW_NODE(NODE_HASH,a,0,0,loc)
18041#define NEW_MASGN(l,r,loc) NEW_NODE(NODE_MASGN,l,0,r,loc)
18042#define NEW_GASGN(v,val,loc) NEW_NODE(NODE_GASGN,v,val,rb_global_entry(v),loc)
18043#define NEW_LASGN(v,val,loc) NEW_NODE(NODE_LASGN,v,val,0,loc)
18044#define NEW_DASGN(v,val,loc) NEW_NODE(NODE_DASGN,v,val,0,loc)
18045#define NEW_DASGN_CURR(v,val,loc) NEW_NODE(NODE_DASGN_CURR,v,val,0,loc)
18046#define NEW_IASGN(v,val,loc) NEW_NODE(NODE_IASGN,v,val,0,loc)
18047#define NEW_CDECL(v,val,path,loc) NEW_NODE(NODE_CDECL,v,val,path,loc)
18048#define NEW_CVASGN(v,val,loc) NEW_NODE(NODE_CVASGN,v,val,0,loc)
18049#define NEW_OP_ASGN1(p,id,a,loc) NEW_NODE(NODE_OP_ASGN1,p,id,a,loc)
18050#define NEW_OP_ASGN2(r,t,i,o,val,loc) NEW_NODE(NODE_OP_ASGN2,r,val,NEW_OP_ASGN22(i,o,t,loc),loc)
18051#define NEW_OP_ASGN22(i,o,t,loc) NEW_NODE(NODE_OP_ASGN2,i,o,t,loc)
18052#define NEW_OP_ASGN_OR(i,val,loc) NEW_NODE(NODE_OP_ASGN_OR,i,val,0,loc)
18053#define NEW_OP_ASGN_AND(i,val,loc) NEW_NODE(NODE_OP_ASGN_AND,i,val,0,loc)
18054#define NEW_OP_CDECL(v,op,val,loc) NEW_NODE(NODE_OP_CDECL,v,val,op,loc)
18055#define NEW_GVAR(v,loc) NEW_NODE(NODE_GVAR,v,0,rb_global_entry(v),loc)
18056#define NEW_LVAR(v,loc) NEW_NODE(NODE_LVAR,v,0,0,loc)
18057#define NEW_DVAR(v,loc) NEW_NODE(NODE_DVAR,v,0,0,loc)
18058#define NEW_IVAR(v,loc) NEW_NODE(NODE_IVAR,v,0,0,loc)
18059#define NEW_CONST(v,loc) NEW_NODE(NODE_CONST,v,0,0,loc)
18060#define NEW_CVAR(v,loc) NEW_NODE(NODE_CVAR,v,0,0,loc)
18061#define NEW_NTH_REF(n,loc) NEW_NODE(NODE_NTH_REF,0,n,0,loc)
18062#define NEW_BACK_REF(n,loc) NEW_NODE(NODE_BACK_REF,0,n,0,loc)
18063#define NEW_MATCH(c,loc) NEW_NODE(NODE_MATCH,c,0,0,loc)
18064#define NEW_MATCH2(n1,n2,loc) NEW_NODE(NODE_MATCH2,n1,n2,0,loc)
18065#define NEW_MATCH3(r,n2,loc) NEW_NODE(NODE_MATCH3,r,n2,0,loc)
18066#define NEW_LIT(l,loc) NEW_NODE(NODE_LIT,l,0,0,loc)
18067#define NEW_STR(s,loc) NEW_NODE(NODE_STR,s,0,0,loc)
18068#define NEW_DSTR(s,loc) NEW_NODE(NODE_DSTR,s,1,0,loc)
18069#define NEW_XSTR(s,loc) NEW_NODE(NODE_XSTR,s,0,0,loc)
18070#define NEW_DXSTR(s,loc) NEW_NODE(NODE_DXSTR,s,0,0,loc)
18071#define NEW_DSYM(s,loc) NEW_NODE(NODE_DSYM,s,0,0,loc)
18072#define NEW_EVSTR(n,loc) NEW_NODE(NODE_EVSTR,0,(n),0,loc)
18073#define NEW_CALL(r,m,a,loc) NEW_NODE(NODE_CALL,r,m,a,loc)
18074#define NEW_OPCALL(r,m,a,loc) NEW_NODE(NODE_OPCALL,r,m,a,loc)
18075#define NEW_FCALL(m,a,loc) NEW_NODE(NODE_FCALL,0,m,a,loc)
18076#define NEW_VCALL(m,loc) NEW_NODE(NODE_VCALL,0,m,0,loc)
18077#define NEW_SUPER(a,loc) NEW_NODE(NODE_SUPER,0,0,a,loc)
18078#define NEW_ZSUPER(loc) NEW_NODE(NODE_ZSUPER,0,0,0,loc)
18079#define NEW_ARGS_AUX(r,b,loc) NEW_NODE(NODE_ARGS_AUX,r,b,0,loc)
18080#define NEW_OPT_ARG(i,v,loc) NEW_NODE(NODE_OPT_ARG,i,v,0,loc)
18081#define NEW_KW_ARG(i,v,loc) NEW_NODE(NODE_KW_ARG,i,v,0,loc)
18082#define NEW_POSTARG(i,v,loc) NEW_NODE(NODE_POSTARG,i,v,0,loc)
18083#define NEW_ARGSCAT(a,b,loc) NEW_NODE(NODE_ARGSCAT,a,b,0,loc)
18084#define NEW_ARGSPUSH(a,b,loc) NEW_NODE(NODE_ARGSPUSH,a,b,0,loc)
18085#define NEW_SPLAT(a,loc) NEW_NODE(NODE_SPLAT,a,0,0,loc)
18086#define NEW_BLOCK_PASS(b,loc) NEW_NODE(NODE_BLOCK_PASS,0,b,0,loc)
18087#define NEW_ALIAS(n,o,loc) NEW_NODE(NODE_ALIAS,n,o,0,loc)
18088#define NEW_VALIAS(n,o,loc) NEW_NODE(NODE_VALIAS,n,o,0,loc)
18089#define NEW_UNDEF(i,loc) NEW_NODE(NODE_UNDEF,0,i,0,loc)
18090#define NEW_CLASS(n,b,s,loc) NEW_NODE(NODE_CLASS,n,NEW_SCOPE(0,b,loc),(s),loc)
18091#define NEW_SCLASS(r,b,loc) NEW_NODE(NODE_SCLASS,r,NEW_SCOPE(0,b,loc),0,loc)
18092#define NEW_MODULE(n,b,loc) NEW_NODE(NODE_MODULE,n,NEW_SCOPE(0,b,loc),0,loc)
18093#define NEW_COLON2(c,i,loc) NEW_NODE(NODE_COLON2,c,i,0,loc)
18094#define NEW_COLON3(i,loc) NEW_NODE(NODE_COLON3,0,i,0,loc)
18095#define NEW_DOT2(b,e,loc) NEW_NODE(NODE_DOT2,b,e,0,loc)
18096#define NEW_DOT3(b,e,loc) NEW_NODE(NODE_DOT3,b,e,0,loc)
18097#define NEW_SELF(loc) NEW_NODE(NODE_SELF,0,0,0,loc)
18098#define NEW_NIL(loc) NEW_NODE(NODE_NIL,0,0,0,loc)
18099#define NEW_TRUE(loc) NEW_NODE(NODE_TRUE,0,0,0,loc)
18100#define NEW_FALSE(loc) NEW_NODE(NODE_FALSE,0,0,0,loc)
18101#define NEW_ERRINFO(loc) NEW_NODE(NODE_ERRINFO,0,0,0,loc)
18102#define NEW_DEFINED(e,loc) NEW_NODE(NODE_DEFINED,e,0,0,loc)
18103#define NEW_PREEXE(b,loc) NEW_SCOPE(b,loc)
18104#define NEW_POSTEXE(b,loc) NEW_NODE(NODE_POSTEXE,0,b,0,loc)
18105#define NEW_ATTRASGN(r,m,a,loc) NEW_NODE(NODE_ATTRASGN,r,m,a,loc)
18106#define NODE_SPECIAL_REQUIRED_KEYWORD ((NODE *)-1)
18107#define NODE_REQUIRED_KEYWORD_P(node) ((node)->nd_value == NODE_SPECIAL_REQUIRED_KEYWORD)
18108#define NODE_SPECIAL_NO_NAME_REST ((NODE *)-1)
18109#define NODE_NAMED_REST_P(node) ((node) != NODE_SPECIAL_NO_NAME_REST)
18110#pragma GCC visibility push(default)
18111#pragma GCC visibility pop
18112#define RUBY_VM_OPTS_H
18113#define OPT_TAILCALL_OPTIMIZATION 0
18114#define OPT_PEEPHOLE_OPTIMIZATION 1
18115#define OPT_SPECIALISED_INSTRUCTION 1
18116#define OPT_INLINE_CONST_CACHE 1
18117#define OPT_FROZEN_STRING_LITERAL 0
18118#define OPT_DEBUG_FROZEN_STRING_LITERAL 0
18119#define OPT_THREADED_CODE 0
18120#define OPT_DIRECT_THREADED_CODE (OPT_THREADED_CODE == 0)
18121#define OPT_TOKEN_THREADED_CODE (OPT_THREADED_CODE == 1)
18122#define OPT_CALL_THREADED_CODE (OPT_THREADED_CODE == 2)
18123#define OPT_CHECKED_RUN 1
18124#define OPT_INLINE_METHOD_CACHE 1
18125#define OPT_GLOBAL_METHOD_CACHE 1
18126#define OPT_BLOCKINLINING 0
18127#define OPT_IC_FOR_IVAR 1
18128#define OPT_OPERANDS_UNIFICATION 1
18129#define OPT_INSTRUCTIONS_UNIFICATION 0
18130#define OPT_UNIFY_ALL_COMBINATION 0
18131#define OPT_STACK_CACHING 0
18132#define SUPPORT_JOKE 0
18133#define VM_COLLECT_USAGE_DETAILS 0
18134#define RUBY_ID_H
18135#define ID_STATIC_SYM RUBY_ID_STATIC_SYM
18136#define ID_SCOPE_SHIFT RUBY_ID_SCOPE_SHIFT
18137#define ID_SCOPE_MASK RUBY_ID_SCOPE_MASK
18138#define ID_LOCAL RUBY_ID_LOCAL
18139#define ID_INSTANCE RUBY_ID_INSTANCE
18140#define ID_GLOBAL RUBY_ID_GLOBAL
18141#define ID_ATTRSET RUBY_ID_ATTRSET
18142#define ID_CONST RUBY_ID_CONST
18143#define ID_CLASS RUBY_ID_CLASS
18144#define ID_JUNK RUBY_ID_JUNK
18145#define ID_INTERNAL RUBY_ID_INTERNAL
18146#define symIFUNC ID2SYM(idIFUNC)
18147#define symCFUNC ID2SYM(idCFUNC)
18148#define RUBY_TOKEN_DOT2 128
18149#define RUBY_TOKEN_DOT3 129
18150#define RUBY_TOKEN_UPLUS 130
18151#define RUBY_TOKEN_UMINUS 131
18152#define RUBY_TOKEN_POW 132
18153#define RUBY_TOKEN_CMP 133
18154#define RUBY_TOKEN_LSHFT 134
18155#define RUBY_TOKEN_RSHFT 135
18156#define RUBY_TOKEN_LEQ 136
18157#define RUBY_TOKEN_GEQ 137
18158#define RUBY_TOKEN_EQ 138
18159#define RUBY_TOKEN_EQQ 139
18160#define RUBY_TOKEN_NEQ 140
18161#define RUBY_TOKEN_MATCH 141
18162#define RUBY_TOKEN_NMATCH 142
18163#define RUBY_TOKEN_AREF 143
18164#define RUBY_TOKEN_ASET 144
18165#define RUBY_TOKEN_COLON2 145
18166#define RUBY_TOKEN_ANDOP 146
18167#define RUBY_TOKEN_OROP 147
18168#define RUBY_TOKEN_ANDDOT 148
18169#define RUBY_TOKEN(t) RUBY_TOKEN_ ##t
18170#define RUBY_TOKEN2ID_TYPE(tok,type) ((tok<<RUBY_ID_SCOPE_SHIFT)|type|RUBY_ID_STATIC_SYM)
18171#define TOKEN2LOCALID(tok) RUBY_TOKEN2ID_TYPE(tok, RUBY_ID_LOCAL)
18172#define TOKEN2INSTANCEID(tok) RUBY_TOKEN2ID_TYPE(tok, RUBY_ID_INSTANCE)
18173#define TOKEN2GLOBALID(tok) RUBY_TOKEN2ID_TYPE(tok, RUBY_ID_GLOBAL)
18174#define TOKEN2CONSTID(tok) RUBY_TOKEN2ID_TYPE(tok, RUBY_ID_CONST)
18175#define TOKEN2CLASSID(tok) RUBY_TOKEN2ID_TYPE(tok, RUBY_ID_CLASS)
18176#define TOKEN2ATTRSETID(tok) RUBY_TOKEN2ID_TYPE(tok, RUBY_ID_ATTRSET)
18177#define DEFINE_LOCALID_FROM_TOKEN(n) id ##n = TOKEN2LOCALID(t ##n)
18178#define DEFINE_INSTANCEID_FROM_TOKEN(n) id ##n = TOKEN2INSTANCEID(t ##n)
18179#define DEFINE_GLOBALID_FROM_TOKEN(n) id ##n = TOKEN2GLOBALID(t ##n)
18180#define DEFINE_CONSTID_FROM_TOKEN(n) id ##n = TOKEN2CONSTID(t ##n)
18181#define DEFINE_CLASSID_FROM_TOKEN(n) id ##n = TOKEN2CLASSID(t ##n)
18182#define DEFINE_ATTRSETID_FROM_TOKEN(n) id ##n = TOKEN2ATTRSETID(t ##n)
18183#define RUBY_METHOD_H 1
18184#define END_OF_ENUMERATION(key)
18185#define METHOD_ENTRY_VISI(me) (rb_method_visibility_t)(((me)->flags & (IMEMO_FL_USER0 | IMEMO_FL_USER1)) >> (IMEMO_FL_USHIFT+0))
18186#define METHOD_ENTRY_BASIC(me) (int) (((me)->flags & (IMEMO_FL_USER2 )) >> (IMEMO_FL_USHIFT+2))
18187#define METHOD_ENTRY_COMPLEMENTED(me) ((me)->flags & IMEMO_FL_USER3)
18188#define METHOD_ENTRY_COMPLEMENTED_SET(me) ((me)->flags = (me)->flags | IMEMO_FL_USER3)
18189#define VM_METHOD_TYPE_MINIMUM_BITS 4
18190#define rb_iseq_t rb_iseq_t
18191#define UNDEFINED_METHOD_ENTRY_P(me) (!(me) || !(me)->def || (me)->def->type == VM_METHOD_TYPE_UNDEF)
18192#define UNDEFINED_REFINED_METHOD_P(def) ((def)->type == VM_METHOD_TYPE_REFINED && UNDEFINED_METHOD_ENTRY_P((def)->body.refined.orig_me))
18193#pragma GCC visibility push(default)
18194#pragma GCC visibility pop
18195#define RUBY_ATOMIC_H
18196#define ATOMIC_SET(var,val) (void)__atomic_exchange_n(&(var), (val), __ATOMIC_SEQ_CST)
18197#define ATOMIC_INC(var) __atomic_fetch_add(&(var), 1, __ATOMIC_SEQ_CST)
18198#define ATOMIC_DEC(var) __atomic_fetch_sub(&(var), 1, __ATOMIC_SEQ_CST)
18199#define ATOMIC_OR(var,val) __atomic_fetch_or(&(var), (val), __ATOMIC_SEQ_CST)
18200#define ATOMIC_EXCHANGE(var,val) __atomic_exchange_n(&(var), (val), __ATOMIC_SEQ_CST)
18201#define ATOMIC_CAS(var,oldval,newval) RB_GNUC_EXTENSION_BLOCK( __typeof__(var) oldvaldup = (oldval); __atomic_compare_exchange_n(&(var), &oldvaldup, (newval), 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); oldvaldup )
18202#define ATOMIC_SIZE_ADD(var,val) __atomic_fetch_add(&(var), (val), __ATOMIC_SEQ_CST)
18203#define ATOMIC_SIZE_SUB(var,val) __atomic_fetch_sub(&(var), (val), __ATOMIC_SEQ_CST)
18204#define RUBY_ATOMIC_GENERIC_MACRO 1
18205#define ATOMIC_SIZE_INC(var) ATOMIC_INC(var)
18206#define ATOMIC_SIZE_DEC(var) ATOMIC_DEC(var)
18207#define ATOMIC_SIZE_EXCHANGE(var,val) ATOMIC_EXCHANGE(var, val)
18208#define ATOMIC_SIZE_CAS(var,oldval,val) ATOMIC_CAS(var, oldval, val)
18209#define ATOMIC_PTR_EXCHANGE(var,val) ATOMIC_EXCHANGE(var, val)
18210#define ATOMIC_PTR_CAS(var,oldval,newval) ATOMIC_CAS(var, oldval, newval)
18211#define ATOMIC_VALUE_EXCHANGE(var,val) ATOMIC_EXCHANGE(var, val)
18212#define ATOMIC_VALUE_CAS(var,oldval,val) ATOMIC_CAS(var, oldval, val)
18213#define CCAN_LIST_H
18214#define _ASSERT_H 1
18215#define __ASSERT_VOID_CAST (void)
18216#define assert(expr) ((void) sizeof ((expr) ? 1 : 0), __extension__ ({ if (expr) ; else __assert_fail (#expr, __FILE__, __LINE__, __ASSERT_FUNCTION); }))
18217#define assert_perror(errnum) (!(errnum) ? __ASSERT_VOID_CAST (0) : __assert_perror_fail ((errnum), __FILE__, __LINE__, __ASSERT_FUNCTION))
18218#define __ASSERT_FUNCTION __extension__ __PRETTY_FUNCTION__
18219#undef static_assert
18220#define static_assert _Static_assert
18221#define CCAN_STR_H
18222#define stringify(expr) stringify_1(expr)
18223#define stringify_1(expr) #expr
18224#define CCAN_CONTAINER_OF_H
18225#define CCAN_CHECK_TYPE_H
18226#define check_type(expr,type) ((typeof(expr) *)0 != (type *)0)
18227#define check_types_match(expr1,expr2) ((typeof(expr1) *)0 != (typeof(expr2) *)0)
18228#define container_of(member_ptr,containing_type,member) ((containing_type *) ((char *)(member_ptr) - container_off(containing_type, member)) + check_types_match(*(member_ptr), ((containing_type *)0)->member))
18229#define container_of_or_null(member_ptr,containing_type,member) ((containing_type *) container_of_or_null_(member_ptr, container_off(containing_type, member)) + check_types_match(*(member_ptr), ((containing_type *)0)->member))
18230#define container_off(containing_type,member) offsetof(containing_type, member)
18231#define container_of_var(member_ptr,container_var,member) container_of(member_ptr, typeof(*container_var), member)
18232#define container_off_var(var,member) container_off(typeof(*var), member)
18233#define LIST_LOC __FILE__ ":" stringify(__LINE__)
18234#define list_debug(h,loc) ((void)loc, h)
18235#define list_debug_node(n,loc) ((void)loc, n)
18236#define LIST_HEAD_INIT(name) { { &(name).n, &(name).n } }
18237#define LIST_HEAD(name) struct list_head name = LIST_HEAD_INIT(name)
18238#define list_add_after(h,p,n) list_add_after_(h, p, n, LIST_LOC)
18239#define list_add(h,n) list_add_(h, n, LIST_LOC)
18240#define list_add_before(h,p,n) list_add_before_(h, p, n, LIST_LOC)
18241#define list_add_tail(h,n) list_add_tail_(h, n, LIST_LOC)
18242#define list_empty(h) list_empty_(h, LIST_LOC)
18243#define list_empty_nodebug(h) list_empty(h)
18244#define list_del(n) list_del_(n, LIST_LOC)
18245#define list_del_init(n) list_del_init_(n, LIST_LOC)
18246#define list_swap(o,n) list_swap_(o, n, LIST_LOC)
18247#define list_entry(n,type,member) container_of(n, type, member)
18248#define list_top(h,type,member) ((type *)list_top_((h), list_off_(type, member)))
18249#define list_pop(h,type,member) ((type *)list_pop_((h), list_off_(type, member)))
18250#define list_tail(h,type,member) ((type *)list_tail_((h), list_off_(type, member)))
18251#define list_for_each(h,i,member) list_for_each_off(h, i, list_off_var_(i, member))
18252#define list_for_each_rev(h,i,member) list_for_each_rev_off(h, i, list_off_var_(i, member))
18253#define list_for_each_rev_safe(h,i,nxt,member) list_for_each_rev_safe_off(h, i, nxt, list_off_var_(i, member))
18254#define list_for_each_safe(h,i,nxt,member) list_for_each_safe_off(h, i, nxt, list_off_var_(i, member))
18255#define list_next(h,i,member) ((list_typeof(i))list_entry_or_null(list_debug(h, __FILE__ ":" stringify(__LINE__)), (i)->member.next, list_off_var_((i), member)))
18256#define list_prev(h,i,member) ((list_typeof(i))list_entry_or_null(list_debug(h, __FILE__ ":" stringify(__LINE__)), (i)->member.prev, list_off_var_((i), member)))
18257#define list_append_list(t,f) list_append_list_(t, f, __FILE__ ":" stringify(__LINE__))
18258#define list_prepend_list(t,f) list_prepend_list_(t, f, LIST_LOC)
18259#define list_for_each_off_dir_(h,i,off,dir) for (i = list_node_to_off_(list_debug(h, LIST_LOC)->n.dir, (off)); list_node_from_off_((void *)i, (off)) != &(h)->n; i = list_node_to_off_(list_node_from_off_((void *)i, (off))->dir, (off)))
18260#define list_for_each_safe_off_dir_(h,i,nxt,off,dir) for (i = list_node_to_off_(list_debug(h, LIST_LOC)->n.dir, (off)), nxt = list_node_to_off_(list_node_from_off_(i, (off))->dir, (off)); list_node_from_off_(i, (off)) != &(h)->n; i = nxt, nxt = list_node_to_off_(list_node_from_off_(i, (off))->dir, (off)))
18261#define list_for_each_off(h,i,off) list_for_each_off_dir_((h),(i),(off),next)
18262#define list_for_each_rev_off(h,i,off) list_for_each_off_dir_((h),(i),(off),prev)
18263#define list_for_each_safe_off(h,i,nxt,off) list_for_each_safe_off_dir_((h),(i),(nxt),(off),next)
18264#define list_for_each_rev_safe_off(h,i,nxt,off) list_for_each_safe_off_dir_((h),(i),(nxt),(off),prev)
18265#define list_entry_off(n,type,off) ((type *)list_node_from_off_((n), (off)))
18266#define list_head_off(h,type,off) ((type *)list_head_off((h), (off)))
18267#define list_tail_off(h,type,off) ((type *)list_tail_((h), (off)))
18268#define list_add_off(h,n,off) list_add((h), list_node_from_off_((n), (off)))
18269#define list_del_off(n,off) list_del(list_node_from_off_((n), (off)))
18270#define list_del_from_off(h,n,off) list_del_from(h, list_node_from_off_((n), (off)))
18271#define list_off_(type,member) (container_off(type, member) + check_type(((type *)0)->member, struct list_node))
18272#define list_off_var_(var,member) (container_off_var(var, member) + check_type(var->member, struct list_node))
18273#define list_typeof(var) typeof(var)
18274#define RUBY_THREAD_NATIVE_H 1
18275#define _PTHREAD_H 1
18276#define _SCHED_H 1
18277#define __need_size_t
18278#define __need_NULL
18279#undef __need_ptrdiff_t
18280#undef __need_size_t
18281#undef __need_wchar_t
18282#undef NULL
18283#define NULL ((void *)0)
18284#undef __need_NULL
18285#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER)
18286#define _BITS_SCHED_H 1
18287#define SCHED_OTHER 0
18288#define SCHED_FIFO 1
18289#define SCHED_RR 2
18290#define SCHED_BATCH 3
18291#define SCHED_ISO 4
18292#define SCHED_IDLE 5
18293#define SCHED_DEADLINE 6
18294#define SCHED_RESET_ON_FORK 0x40000000
18295#define CSIGNAL 0x000000ff
18296#define CLONE_VM 0x00000100
18297#define CLONE_FS 0x00000200
18298#define CLONE_FILES 0x00000400
18299#define CLONE_SIGHAND 0x00000800
18300#define CLONE_PIDFD 0x00001000
18301#define CLONE_PTRACE 0x00002000
18302#define CLONE_VFORK 0x00004000
18303#define CLONE_PARENT 0x00008000
18304#define CLONE_THREAD 0x00010000
18305#define CLONE_NEWNS 0x00020000
18306#define CLONE_SYSVSEM 0x00040000
18307#define CLONE_SETTLS 0x00080000
18308#define CLONE_PARENT_SETTID 0x00100000
18309#define CLONE_CHILD_CLEARTID 0x00200000
18310#define CLONE_DETACHED 0x00400000
18311#define CLONE_UNTRACED 0x00800000
18312#define CLONE_CHILD_SETTID 0x01000000
18313#define CLONE_NEWCGROUP 0x02000000
18314#define CLONE_NEWUTS 0x04000000
18315#define CLONE_NEWIPC 0x08000000
18316#define CLONE_NEWUSER 0x10000000
18317#define CLONE_NEWPID 0x20000000
18318#define CLONE_NEWNET 0x40000000
18319#define CLONE_IO 0x80000000
18320#define _BITS_TYPES_STRUCT_SCHED_PARAM 1
18321#define _BITS_CPU_SET_H 1
18322#define __CPU_SETSIZE 1024
18323#define __NCPUBITS (8 * sizeof (__cpu_mask))
18324#define __CPUELT(cpu) ((cpu) / __NCPUBITS)
18325#define __CPUMASK(cpu) ((__cpu_mask) 1 << ((cpu) % __NCPUBITS))
18326#define __CPU_ZERO_S(setsize,cpusetp) do __builtin_memset (cpusetp, '\0', setsize); while (0)
18327#define __CPU_SET_S(cpu,setsize,cpusetp) (__extension__ ({ size_t __cpu = (cpu); __cpu / 8 < (setsize) ? (((__cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)] |= __CPUMASK (__cpu)) : 0; }))
18328#define __CPU_CLR_S(cpu,setsize,cpusetp) (__extension__ ({ size_t __cpu = (cpu); __cpu / 8 < (setsize) ? (((__cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)] &= ~__CPUMASK (__cpu)) : 0; }))
18329#define __CPU_ISSET_S(cpu,setsize,cpusetp) (__extension__ ({ size_t __cpu = (cpu); __cpu / 8 < (setsize) ? ((((const __cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)] & __CPUMASK (__cpu))) != 0 : 0; }))
18330#define __CPU_COUNT_S(setsize,cpusetp) __sched_cpucount (setsize, cpusetp)
18331#define __CPU_EQUAL_S(setsize,cpusetp1,cpusetp2) (__builtin_memcmp (cpusetp1, cpusetp2, setsize) == 0)
18332#define __CPU_OP_S(setsize,destset,srcset1,srcset2,op) (__extension__ ({ cpu_set_t *__dest = (destset); const __cpu_mask *__arr1 = (srcset1)->__bits; const __cpu_mask *__arr2 = (srcset2)->__bits; size_t __imax = (setsize) / sizeof (__cpu_mask); size_t __i; for (__i = 0; __i < __imax; ++__i) ((__cpu_mask *) __dest->__bits)[__i] = __arr1[__i] op __arr2[__i]; __dest; }))
18333#define __CPU_ALLOC_SIZE(count) ((((count) + __NCPUBITS - 1) / __NCPUBITS) * sizeof (__cpu_mask))
18334#define __CPU_ALLOC(count) __sched_cpualloc (count)
18335#define __CPU_FREE(cpuset) __sched_cpufree (cpuset)
18336#define sched_priority sched_priority
18337#define __sched_priority sched_priority
18338#define CPU_SETSIZE __CPU_SETSIZE
18339#define CPU_SET(cpu,cpusetp) __CPU_SET_S (cpu, sizeof (cpu_set_t), cpusetp)
18340#define CPU_CLR(cpu,cpusetp) __CPU_CLR_S (cpu, sizeof (cpu_set_t), cpusetp)
18341#define CPU_ISSET(cpu,cpusetp) __CPU_ISSET_S (cpu, sizeof (cpu_set_t), cpusetp)
18342#define CPU_ZERO(cpusetp) __CPU_ZERO_S (sizeof (cpu_set_t), cpusetp)
18343#define CPU_COUNT(cpusetp) __CPU_COUNT_S (sizeof (cpu_set_t), cpusetp)
18344#define CPU_SET_S(cpu,setsize,cpusetp) __CPU_SET_S (cpu, setsize, cpusetp)
18345#define CPU_CLR_S(cpu,setsize,cpusetp) __CPU_CLR_S (cpu, setsize, cpusetp)
18346#define CPU_ISSET_S(cpu,setsize,cpusetp) __CPU_ISSET_S (cpu, setsize, cpusetp)
18347#define CPU_ZERO_S(setsize,cpusetp) __CPU_ZERO_S (setsize, cpusetp)
18348#define CPU_COUNT_S(setsize,cpusetp) __CPU_COUNT_S (setsize, cpusetp)
18349#define CPU_EQUAL(cpusetp1,cpusetp2) __CPU_EQUAL_S (sizeof (cpu_set_t), cpusetp1, cpusetp2)
18350#define CPU_EQUAL_S(setsize,cpusetp1,cpusetp2) __CPU_EQUAL_S (setsize, cpusetp1, cpusetp2)
18351#define CPU_AND(destset,srcset1,srcset2) __CPU_OP_S (sizeof (cpu_set_t), destset, srcset1, srcset2, &)
18352#define CPU_OR(destset,srcset1,srcset2) __CPU_OP_S (sizeof (cpu_set_t), destset, srcset1, srcset2, |)
18353#define CPU_XOR(destset,srcset1,srcset2) __CPU_OP_S (sizeof (cpu_set_t), destset, srcset1, srcset2, ^)
18354#define CPU_AND_S(setsize,destset,srcset1,srcset2) __CPU_OP_S (setsize, destset, srcset1, srcset2, &)
18355#define CPU_OR_S(setsize,destset,srcset1,srcset2) __CPU_OP_S (setsize, destset, srcset1, srcset2, |)
18356#define CPU_XOR_S(setsize,destset,srcset1,srcset2) __CPU_OP_S (setsize, destset, srcset1, srcset2, ^)
18357#define CPU_ALLOC_SIZE(count) __CPU_ALLOC_SIZE (count)
18358#define CPU_ALLOC(count) __CPU_ALLOC (count)
18359#define CPU_FREE(cpuset) __CPU_FREE (cpuset)
18360#define _TIME_H 1
18361#define __need_size_t
18362#define __need_NULL
18363#undef __need_ptrdiff_t
18364#undef __need_size_t
18365#undef __need_wchar_t
18366#undef NULL
18367#define NULL ((void *)0)
18368#undef __need_NULL
18369#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER)
18370#define _BITS_TIME_H 1
18371#define CLOCKS_PER_SEC ((__clock_t) 1000000)
18372#define CLOCK_REALTIME 0
18373#define CLOCK_MONOTONIC 1
18374#define CLOCK_PROCESS_CPUTIME_ID 2
18375#define CLOCK_THREAD_CPUTIME_ID 3
18376#define CLOCK_MONOTONIC_RAW 4
18377#define CLOCK_REALTIME_COARSE 5
18378#define CLOCK_MONOTONIC_COARSE 6
18379#define CLOCK_BOOTTIME 7
18380#define CLOCK_REALTIME_ALARM 8
18381#define CLOCK_BOOTTIME_ALARM 9
18382#define CLOCK_TAI 11
18383#define TIMER_ABSTIME 1
18384#define _BITS_TIMEX_H 1
18385#define ADJ_OFFSET 0x0001
18386#define ADJ_FREQUENCY 0x0002
18387#define ADJ_MAXERROR 0x0004
18388#define ADJ_ESTERROR 0x0008
18389#define ADJ_STATUS 0x0010
18390#define ADJ_TIMECONST 0x0020
18391#define ADJ_TAI 0x0080
18392#define ADJ_SETOFFSET 0x0100
18393#define ADJ_MICRO 0x1000
18394#define ADJ_NANO 0x2000
18395#define ADJ_TICK 0x4000
18396#define ADJ_OFFSET_SINGLESHOT 0x8001
18397#define ADJ_OFFSET_SS_READ 0xa001
18398#define MOD_OFFSET ADJ_OFFSET
18399#define MOD_FREQUENCY ADJ_FREQUENCY
18400#define MOD_MAXERROR ADJ_MAXERROR
18401#define MOD_ESTERROR ADJ_ESTERROR
18402#define MOD_STATUS ADJ_STATUS
18403#define MOD_TIMECONST ADJ_TIMECONST
18404#define MOD_CLKB ADJ_TICK
18405#define MOD_CLKA ADJ_OFFSET_SINGLESHOT
18406#define MOD_TAI ADJ_TAI
18407#define MOD_MICRO ADJ_MICRO
18408#define MOD_NANO ADJ_NANO
18409#define STA_PLL 0x0001
18410#define STA_PPSFREQ 0x0002
18411#define STA_PPSTIME 0x0004
18412#define STA_FLL 0x0008
18413#define STA_INS 0x0010
18414#define STA_DEL 0x0020
18415#define STA_UNSYNC 0x0040
18416#define STA_FREQHOLD 0x0080
18417#define STA_PPSSIGNAL 0x0100
18418#define STA_PPSJITTER 0x0200
18419#define STA_PPSWANDER 0x0400
18420#define STA_PPSERROR 0x0800
18421#define STA_CLOCKERR 0x1000
18422#define STA_NANO 0x2000
18423#define STA_MODE 0x4000
18424#define STA_CLK 0x8000
18425#define STA_RONLY (STA_PPSSIGNAL | STA_PPSJITTER | STA_PPSWANDER | STA_PPSERROR | STA_CLOCKERR | STA_NANO | STA_MODE | STA_CLK)
18426#define __struct_tm_defined 1
18427#define __itimerspec_defined 1
18428#define TIME_UTC 1
18429#define __isleap(year) ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0))
18430#define _BITS_SETJMP_H 1
18431#define __WORDSIZE 64
18432#define __WORDSIZE_TIME64_COMPAT32 1
18433#define __SYSCALL_WORDSIZE 64
18434#define __WORDSIZE 64
18435#define __WORDSIZE_TIME64_COMPAT32 1
18436#define __SYSCALL_WORDSIZE 64
18437#define PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_JOINABLE
18438#define PTHREAD_CREATE_DETACHED PTHREAD_CREATE_DETACHED
18439#define PTHREAD_MUTEX_INITIALIZER { { __PTHREAD_MUTEX_INITIALIZER (PTHREAD_MUTEX_TIMED_NP) } }
18440#define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP { { __PTHREAD_MUTEX_INITIALIZER (PTHREAD_MUTEX_RECURSIVE_NP) } }
18441#define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP { { __PTHREAD_MUTEX_INITIALIZER (PTHREAD_MUTEX_ERRORCHECK_NP) } }
18442#define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP { { __PTHREAD_MUTEX_INITIALIZER (PTHREAD_MUTEX_ADAPTIVE_NP) } }
18443#define PTHREAD_RWLOCK_INITIALIZER { { __PTHREAD_RWLOCK_INITIALIZER (PTHREAD_RWLOCK_DEFAULT_NP) } }
18444#define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP { { __PTHREAD_RWLOCK_INITIALIZER (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP) } }
18445#define PTHREAD_INHERIT_SCHED PTHREAD_INHERIT_SCHED
18446#define PTHREAD_EXPLICIT_SCHED PTHREAD_EXPLICIT_SCHED
18447#define PTHREAD_SCOPE_SYSTEM PTHREAD_SCOPE_SYSTEM
18448#define PTHREAD_SCOPE_PROCESS PTHREAD_SCOPE_PROCESS
18449#define PTHREAD_PROCESS_PRIVATE PTHREAD_PROCESS_PRIVATE
18450#define PTHREAD_PROCESS_SHARED PTHREAD_PROCESS_SHARED
18451#define PTHREAD_COND_INITIALIZER { { {0}, {0}, {0, 0}, {0, 0}, 0, 0, {0, 0} } }
18452#define PTHREAD_CANCEL_ENABLE PTHREAD_CANCEL_ENABLE
18453#define PTHREAD_CANCEL_DISABLE PTHREAD_CANCEL_DISABLE
18454#define PTHREAD_CANCEL_DEFERRED PTHREAD_CANCEL_DEFERRED
18455#define PTHREAD_CANCEL_ASYNCHRONOUS PTHREAD_CANCEL_ASYNCHRONOUS
18456#define PTHREAD_CANCELED ((void *) -1)
18457#define PTHREAD_ONCE_INIT 0
18458#define PTHREAD_BARRIER_SERIAL_THREAD -1
18459#define PTHREAD_ATTR_NO_SIGMASK_NP (-1)
18460#define __cleanup_fct_attribute
18461#define pthread_cleanup_push(routine,arg) do { __pthread_unwind_buf_t __cancel_buf; void (*__cancel_routine) (void *) = (routine); void *__cancel_arg = (arg); int __not_first_call = __sigsetjmp ((struct __jmp_buf_tag *) (void *) __cancel_buf.__cancel_jmp_buf, 0); if (__glibc_unlikely (__not_first_call)) { __cancel_routine (__cancel_arg); __pthread_unwind_next (&__cancel_buf); } __pthread_register_cancel (&__cancel_buf); do {
18462#define pthread_cleanup_pop(execute) do { } while (0); } while (0); __pthread_unregister_cancel (&__cancel_buf); if (execute) __cancel_routine (__cancel_arg); } while (0)
18463#define pthread_cleanup_push_defer_np(routine,arg) do { __pthread_unwind_buf_t __cancel_buf; void (*__cancel_routine) (void *) = (routine); void *__cancel_arg = (arg); int __not_first_call = __sigsetjmp ((struct __jmp_buf_tag *) (void *) __cancel_buf.__cancel_jmp_buf, 0); if (__glibc_unlikely (__not_first_call)) { __cancel_routine (__cancel_arg); __pthread_unwind_next (&__cancel_buf); } __pthread_register_cancel_defer (&__cancel_buf); do {
18464#define pthread_cleanup_pop_restore_np(execute) do { } while (0); } while (0); __pthread_unregister_cancel_restore (&__cancel_buf); if (execute) __cancel_routine (__cancel_arg); } while (0)
18465#pragma GCC visibility push(default)
18466#pragma GCC visibility pop
18467#define RUBY_THREAD_PTHREAD_H
18468#define RB_NATIVETHREAD_LOCK_INIT PTHREAD_MUTEX_INITIALIZER
18469#define RB_NATIVETHREAD_COND_INIT PTHREAD_COND_INITIALIZER
18470#undef except
18471#undef try
18472#undef leave
18473#undef finally
18474#define _SETJMP_H 1
18475#define setjmp(env) _setjmp (env)
18476#define sigsetjmp(env,savemask) __sigsetjmp (env, savemask)
18477#define _SIGNAL_H
18478#define _BITS_SIGNUM_GENERIC_H 1
18479#define SIG_ERR ((__sighandler_t) -1)
18480#define SIG_DFL ((__sighandler_t) 0)
18481#define SIG_IGN ((__sighandler_t) 1)
18482#define SIG_HOLD ((__sighandler_t) 2)
18483#define SIGINT 2
18484#define SIGILL 4
18485#define SIGABRT 6
18486#define SIGFPE 8
18487#define SIGSEGV 11
18488#define SIGTERM 15
18489#define SIGHUP 1
18490#define SIGQUIT 3
18491#define SIGTRAP 5
18492#define SIGKILL 9
18493#define SIGPIPE 13
18494#define SIGALRM 14
18495#define SIGIO SIGPOLL
18496#define SIGIOT SIGABRT
18497#define SIGCLD SIGCHLD
18498#define _BITS_SIGNUM_ARCH_H 1
18499#define SIGSTKFLT 16
18500#define SIGPWR 30
18501#define SIGBUS 7
18502#define SIGSYS 31
18503#define SIGURG 23
18504#define SIGSTOP 19
18505#define SIGTSTP 20
18506#define SIGCONT 18
18507#define SIGCHLD 17
18508#define SIGTTIN 21
18509#define SIGTTOU 22
18510#define SIGPOLL 29
18511#define SIGXFSZ 25
18512#define SIGXCPU 24
18513#define SIGVTALRM 26
18514#define SIGPROF 27
18515#define SIGUSR1 10
18516#define SIGUSR2 12
18517#define SIGWINCH 28
18518#define SIGIO SIGPOLL
18519#define SIGIOT SIGABRT
18520#define SIGCLD SIGCHLD
18521#define __SIGRTMIN 32
18522#define __SIGRTMAX 64
18523#define _NSIG (__SIGRTMAX + 1)
18524#define __sig_atomic_t_defined 1
18525#define __siginfo_t_defined 1
18526#define __WORDSIZE 64
18527#define __WORDSIZE_TIME64_COMPAT32 1
18528#define __SYSCALL_WORDSIZE 64
18529#define ____sigval_t_defined
18530#define __SI_MAX_SIZE 128
18531#define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 4)
18532#define _BITS_SIGINFO_ARCH_H 1
18533#define __SI_ALIGNMENT
18534#define __SI_BAND_TYPE long int
18535#define __SI_CLOCK_T __clock_t
18536#define __SI_ERRNO_THEN_CODE 1
18537#define __SI_HAVE_SIGSYS 1
18538#define __SI_SIGFAULT_ADDL
18539#define si_pid _sifields._kill.si_pid
18540#define si_uid _sifields._kill.si_uid
18541#define si_timerid _sifields._timer.si_tid
18542#define si_overrun _sifields._timer.si_overrun
18543#define si_status _sifields._sigchld.si_status
18544#define si_utime _sifields._sigchld.si_utime
18545#define si_stime _sifields._sigchld.si_stime
18546#define si_value _sifields._rt.si_sigval
18547#define si_int _sifields._rt.si_sigval.sival_int
18548#define si_ptr _sifields._rt.si_sigval.sival_ptr
18549#define si_addr _sifields._sigfault.si_addr
18550#define si_addr_lsb _sifields._sigfault.si_addr_lsb
18551#define si_lower _sifields._sigfault._bounds._addr_bnd._lower
18552#define si_upper _sifields._sigfault._bounds._addr_bnd._upper
18553#define si_pkey _sifields._sigfault._bounds._pkey
18554#define si_band _sifields._sigpoll.si_band
18555#define si_fd _sifields._sigpoll.si_fd
18556#define si_call_addr _sifields._sigsys._call_addr
18557#define si_syscall _sifields._sigsys._syscall
18558#define si_arch _sifields._sigsys._arch
18559#define _BITS_SIGINFO_CONSTS_H 1
18560#define __SI_ASYNCIO_AFTER_SIGIO 1
18561#define SI_ASYNCNL SI_ASYNCNL
18562#define SI_DETHREAD SI_DETHREAD
18563#define SI_TKILL SI_TKILL
18564#define SI_SIGIO SI_SIGIO
18565#define SI_ASYNCIO SI_ASYNCIO
18566#define SI_MESGQ SI_MESGQ
18567#define SI_TIMER SI_TIMER
18568#define SI_ASYNCIO SI_ASYNCIO
18569#define SI_QUEUE SI_QUEUE
18570#define SI_USER SI_USER
18571#define SI_KERNEL SI_KERNEL
18572#define ILL_ILLOPC ILL_ILLOPC
18573#define ILL_ILLOPN ILL_ILLOPN
18574#define ILL_ILLADR ILL_ILLADR
18575#define ILL_ILLTRP ILL_ILLTRP
18576#define ILL_PRVOPC ILL_PRVOPC
18577#define ILL_PRVREG ILL_PRVREG
18578#define ILL_COPROC ILL_COPROC
18579#define ILL_BADSTK ILL_BADSTK
18580#define ILL_BADIADDR ILL_BADIADDR
18581#define FPE_INTDIV FPE_INTDIV
18582#define FPE_INTOVF FPE_INTOVF
18583#define FPE_FLTDIV FPE_FLTDIV
18584#define FPE_FLTOVF FPE_FLTOVF
18585#define FPE_FLTUND FPE_FLTUND
18586#define FPE_FLTRES FPE_FLTRES
18587#define FPE_FLTINV FPE_FLTINV
18588#define FPE_FLTSUB FPE_FLTSUB
18589#define FPE_FLTUNK FPE_FLTUNK
18590#define FPE_CONDTRAP FPE_CONDTRAP
18591#define SEGV_MAPERR SEGV_MAPERR
18592#define SEGV_ACCERR SEGV_ACCERR
18593#define SEGV_BNDERR SEGV_BNDERR
18594#define SEGV_PKUERR SEGV_PKUERR
18595#define SEGV_ACCADI SEGV_ACCADI
18596#define SEGV_ADIDERR SEGV_ADIDERR
18597#define SEGV_ADIPERR SEGV_ADIPERR
18598#define BUS_ADRALN BUS_ADRALN
18599#define BUS_ADRERR BUS_ADRERR
18600#define BUS_OBJERR BUS_OBJERR
18601#define BUS_MCEERR_AR BUS_MCEERR_AR
18602#define BUS_MCEERR_AO BUS_MCEERR_AO
18603#define TRAP_BRKPT TRAP_BRKPT
18604#define TRAP_TRACE TRAP_TRACE
18605#define TRAP_BRANCH TRAP_BRANCH
18606#define TRAP_HWBKPT TRAP_HWBKPT
18607#define TRAP_UNK TRAP_UNK
18608#define CLD_EXITED CLD_EXITED
18609#define CLD_KILLED CLD_KILLED
18610#define CLD_DUMPED CLD_DUMPED
18611#define CLD_TRAPPED CLD_TRAPPED
18612#define CLD_STOPPED CLD_STOPPED
18613#define CLD_CONTINUED CLD_CONTINUED
18614#define POLL_IN POLL_IN
18615#define POLL_OUT POLL_OUT
18616#define POLL_MSG POLL_MSG
18617#define POLL_ERR POLL_ERR
18618#define POLL_PRI POLL_PRI
18619#define POLL_HUP POLL_HUP
18620#define _BITS_SIGINFO_CONSTS_ARCH_H 1
18621#define __sigval_t_defined
18622#define __sigevent_t_defined 1
18623#define __WORDSIZE 64
18624#define __WORDSIZE_TIME64_COMPAT32 1
18625#define __SYSCALL_WORDSIZE 64
18626#define __SIGEV_MAX_SIZE 64
18627#define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 4)
18628#define sigev_notify_function _sigev_un._sigev_thread._function
18629#define sigev_notify_attributes _sigev_un._sigev_thread._attribute
18630#define _BITS_SIGEVENT_CONSTS_H 1
18631#define SIGEV_SIGNAL SIGEV_SIGNAL
18632#define SIGEV_NONE SIGEV_NONE
18633#define SIGEV_THREAD SIGEV_THREAD
18634#define SIGEV_THREAD_ID SIGEV_THREAD_ID
18635#define sigmask(sig) __glibc_macro_warning ("sigmask is deprecated") ((int)(1u << ((sig) - 1)))
18636#define NSIG _NSIG
18637#define _BITS_SIGACTION_H 1
18638#define sa_handler __sigaction_handler.sa_handler
18639#define sa_sigaction __sigaction_handler.sa_sigaction
18640#define SA_NOCLDSTOP 1
18641#define SA_NOCLDWAIT 2
18642#define SA_SIGINFO 4
18643#define SA_ONSTACK 0x08000000
18644#define SA_RESTART 0x10000000
18645#define SA_NODEFER 0x40000000
18646#define SA_RESETHAND 0x80000000
18647#define SA_INTERRUPT 0x20000000
18648#define SA_NOMASK SA_NODEFER
18649#define SA_ONESHOT SA_RESETHAND
18650#define SA_STACK SA_ONSTACK
18651#define SIG_BLOCK 0
18652#define SIG_UNBLOCK 1
18653#define SIG_SETMASK 2
18654#define _BITS_SIGCONTEXT_H 1
18655#define FP_XSTATE_MAGIC1 0x46505853U
18656#define FP_XSTATE_MAGIC2 0x46505845U
18657#define FP_XSTATE_MAGIC2_SIZE sizeof (FP_XSTATE_MAGIC2)
18658#define __need_size_t
18659#undef __need_ptrdiff_t
18660#undef __need_size_t
18661#undef __need_wchar_t
18662#undef NULL
18663#define NULL ((void *)0)
18664#undef __need_NULL
18665#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER)
18666#define __stack_t_defined 1
18667#define __need_size_t
18668#undef __need_ptrdiff_t
18669#undef __need_size_t
18670#undef __need_wchar_t
18671#undef NULL
18672#define NULL ((void *)0)
18673#undef __need_NULL
18674#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER)
18675#define _SYS_UCONTEXT_H 1
18676#define __ctx(fld) fld
18677#define __NGREG 23
18678#define NGREG __NGREG
18679#define REG_R8 REG_R8
18680#define REG_R9 REG_R9
18681#define REG_R10 REG_R10
18682#define REG_R11 REG_R11
18683#define REG_R12 REG_R12
18684#define REG_R13 REG_R13
18685#define REG_R14 REG_R14
18686#define REG_R15 REG_R15
18687#define REG_RDI REG_RDI
18688#define REG_RSI REG_RSI
18689#define REG_RBP REG_RBP
18690#define REG_RBX REG_RBX
18691#define REG_RDX REG_RDX
18692#define REG_RAX REG_RAX
18693#define REG_RCX REG_RCX
18694#define REG_RSP REG_RSP
18695#define REG_RIP REG_RIP
18696#define REG_EFL REG_EFL
18697#define REG_CSGSFS REG_CSGSFS
18698#define REG_ERR REG_ERR
18699#define REG_TRAPNO REG_TRAPNO
18700#define REG_OLDMASK REG_OLDMASK
18701#define REG_CR2 REG_CR2
18702#undef __ctx
18703#define _BITS_SIGSTACK_H 1
18704#define MINSIGSTKSZ 2048
18705#define SIGSTKSZ 8192
18706#define _BITS_SS_FLAGS_H 1
18707#define SS_ONSTACK SS_ONSTACK
18708#define SS_DISABLE SS_DISABLE
18709#define __sigstack_defined 1
18710#define _BITS_SIGTHREAD_H 1
18711#define SIGRTMIN (__libc_current_sigrtmin ())
18712#define SIGRTMAX (__libc_current_sigrtmax ())
18713#define RUBY_NSIG NSIG
18714#define RUBY_SIGCHLD (SIGCLD)
18715#define SIGCHLD_LOSSY (0)
18716#define WAITPID_USE_SIGCHLD (RUBY_SIGCHLD || SIGCHLD_LOSSY)
18717#define va_init_list(a,b) va_start((a),(b))
18718#define USE_SIGALTSTACK
18719#define RB_ALTSTACK_INIT(var) var = rb_register_sigaltstack()
18720#define RB_ALTSTACK_FREE(var) xfree(var)
18721#define RB_ALTSTACK(var) var
18722#define TAG_NONE RUBY_TAG_NONE
18723#define TAG_RETURN RUBY_TAG_RETURN
18724#define TAG_BREAK RUBY_TAG_BREAK
18725#define TAG_NEXT RUBY_TAG_NEXT
18726#define TAG_RETRY RUBY_TAG_RETRY
18727#define TAG_REDO RUBY_TAG_REDO
18728#define TAG_RAISE RUBY_TAG_RAISE
18729#define TAG_THROW RUBY_TAG_THROW
18730#define TAG_FATAL RUBY_TAG_FATAL
18731#define TAG_MASK RUBY_TAG_MASK
18732#define CoreDataFromValue(obj,type) (type*)DATA_PTR(obj)
18733#define GetCoreDataFromValue(obj,type,ptr) ((ptr) = CoreDataFromValue((obj), type))
18734#define PATHOBJ_PATH 0
18735#define PATHOBJ_REALPATH 1
18736#define USE_LAZY_LOAD 0
18737#define GetVMPtr(obj,ptr) GetCoreDataFromValue((obj), rb_vm_t, (ptr))
18738#define RUBY_VM_SIZE_ALIGN 4096
18739#define RUBY_VM_THREAD_VM_STACK_SIZE ( 128 * 1024 * sizeof(VALUE))
18740#define RUBY_VM_THREAD_VM_STACK_SIZE_MIN ( 2 * 1024 * sizeof(VALUE))
18741#define RUBY_VM_THREAD_MACHINE_STACK_SIZE ( 128 * 1024 * sizeof(VALUE))
18742#define RUBY_VM_THREAD_MACHINE_STACK_SIZE_MIN ( 16 * 1024 * sizeof(VALUE))
18743#define RUBY_VM_FIBER_VM_STACK_SIZE ( 16 * 1024 * sizeof(VALUE))
18744#define RUBY_VM_FIBER_VM_STACK_SIZE_MIN ( 2 * 1024 * sizeof(VALUE))
18745#define RUBY_VM_FIBER_MACHINE_STACK_SIZE ( 64 * 1024 * sizeof(VALUE))
18746#define RUBY_VM_FIBER_MACHINE_STACK_SIZE_MIN ( 16 * 1024 * sizeof(VALUE))
18747#define INTEGER_REDEFINED_OP_FLAG (1 << 0)
18748#define FLOAT_REDEFINED_OP_FLAG (1 << 1)
18749#define STRING_REDEFINED_OP_FLAG (1 << 2)
18750#define ARRAY_REDEFINED_OP_FLAG (1 << 3)
18751#define HASH_REDEFINED_OP_FLAG (1 << 4)
18752#define SYMBOL_REDEFINED_OP_FLAG (1 << 6)
18753#define TIME_REDEFINED_OP_FLAG (1 << 7)
18754#define REGEXP_REDEFINED_OP_FLAG (1 << 8)
18755#define NIL_REDEFINED_OP_FLAG (1 << 9)
18756#define TRUE_REDEFINED_OP_FLAG (1 << 10)
18757#define FALSE_REDEFINED_OP_FLAG (1 << 11)
18758#define PROC_REDEFINED_OP_FLAG (1 << 12)
18759#define BASIC_OP_UNREDEFINED_P(op,klass) (LIKELY((GET_VM()->redefined_flag[(op)]&(klass)) == 0))
18760#define VM_DEBUG_BP_CHECK 0
18761#define VM_DEBUG_VERIFY_METHOD_CACHE (VM_DEBUG_MODE != 0)
18762#define VM_DEFINECLASS_TYPE(x) ((rb_vm_defineclass_type_t)(x) & VM_DEFINECLASS_TYPE_MASK)
18763#define VM_DEFINECLASS_FLAG_SCOPED 0x08
18764#define VM_DEFINECLASS_FLAG_HAS_SUPERCLASS 0x10
18765#define VM_DEFINECLASS_SCOPED_P(x) ((x) & VM_DEFINECLASS_FLAG_SCOPED)
18766#define VM_DEFINECLASS_HAS_SUPERCLASS_P(x) ((x) & VM_DEFINECLASS_FLAG_HAS_SUPERCLASS)
18767#pragma GCC visibility push(default)
18768#pragma GCC visibility pop
18769#define GetProcPtr(obj,ptr) GetCoreDataFromValue((obj), rb_proc_t, (ptr))
18770#define GetBindingPtr(obj,ptr) GetCoreDataFromValue((obj), rb_binding_t, (ptr))
18771#define VM_CHECKMATCH_TYPE_MASK 0x03
18772#define VM_CHECKMATCH_ARRAY 0x04
18773#define VM_CALL_ARGS_SPLAT (0x01 << VM_CALL_ARGS_SPLAT_bit)
18774#define VM_CALL_ARGS_BLOCKARG (0x01 << VM_CALL_ARGS_BLOCKARG_bit)
18775#define VM_CALL_FCALL (0x01 << VM_CALL_FCALL_bit)
18776#define VM_CALL_VCALL (0x01 << VM_CALL_VCALL_bit)
18777#define VM_CALL_ARGS_SIMPLE (0x01 << VM_CALL_ARGS_SIMPLE_bit)
18778#define VM_CALL_BLOCKISEQ (0x01 << VM_CALL_BLOCKISEQ_bit)
18779#define VM_CALL_KWARG (0x01 << VM_CALL_KWARG_bit)
18780#define VM_CALL_KW_SPLAT (0x01 << VM_CALL_KW_SPLAT_bit)
18781#define VM_CALL_TAILCALL (0x01 << VM_CALL_TAILCALL_bit)
18782#define VM_CALL_SUPER (0x01 << VM_CALL_SUPER_bit)
18783#define VM_CALL_ZSUPER (0x01 << VM_CALL_ZSUPER_bit)
18784#define VM_CALL_OPT_SEND (0x01 << VM_CALL_OPT_SEND_bit)
18785#define FUNC_FASTCALL(x) x
18786#define VM_TAGGED_PTR_SET(p,tag) ((VALUE)(p) | (tag))
18787#define VM_TAGGED_PTR_REF(v,mask) ((void *)((v) & ~mask))
18788#define GC_GUARDED_PTR(p) VM_TAGGED_PTR_SET((p), 0x01)
18789#define GC_GUARDED_PTR_REF(p) VM_TAGGED_PTR_REF((p), 0x03)
18790#define GC_GUARDED_PTR_P(p) (((VALUE)(p)) & 0x01)
18791#define VM_ENV_DATA_SIZE ( 3)
18792#define VM_ENV_DATA_INDEX_ME_CREF (-2)
18793#define VM_ENV_DATA_INDEX_SPECVAL (-1)
18794#define VM_ENV_DATA_INDEX_FLAGS ( 0)
18795#define VM_ENV_DATA_INDEX_ENV ( 1)
18796#define VM_ENV_INDEX_LAST_LVAR (-VM_ENV_DATA_SIZE)
18797#define RUBYVM_CFUNC_FRAME_P(cfp) (VM_FRAME_TYPE(cfp) == VM_FRAME_MAGIC_CFUNC)
18798#define VM_GUARDED_PREV_EP(ep) GC_GUARDED_PTR(ep)
18799#define VM_BLOCK_HANDLER_NONE 0
18800#define RUBY_VM_PREVIOUS_CONTROL_FRAME(cfp) ((cfp)+1)
18801#define RUBY_VM_NEXT_CONTROL_FRAME(cfp) ((cfp)-1)
18802#define RUBY_VM_VALID_CONTROL_FRAME_P(cfp,ecfp) ((void *)(ecfp) > (void *)(cfp))
18803#define SDR() rb_vmdebug_stack_dump_raw(GET_EC(), GET_EC()->cfp)
18804#define SDR2(cfp) rb_vmdebug_stack_dump_raw(GET_EC(), (cfp))
18805#pragma GCC visibility push(default)
18806#pragma GCC visibility pop
18807#define rb_vm_register_special_exception(sp,e,m) rb_vm_register_special_exception_str(sp, e, rb_usascii_str_new_static((m), (long)rb_strlen_lit(m)))
18808#define sysstack_error GET_VM()->special_exceptions[ruby_error_sysstack]
18809#define RUBY_CONST_ASSERT(expr) (1/!!(expr))
18810#define VM_STACK_OVERFLOWED_P(cfp,sp,margin) (!RUBY_CONST_ASSERT(sizeof(*(sp)) == sizeof(VALUE)) || !RUBY_CONST_ASSERT(sizeof(*(cfp)) == sizeof(rb_control_frame_t)) || ((rb_control_frame_t *)((sp) + (margin)) + 1) >= (cfp))
18811#define WHEN_VM_STACK_OVERFLOWED(cfp,sp,margin) if (LIKELY(!VM_STACK_OVERFLOWED_P(cfp, sp, margin))) {(void)0;} else
18812#define CHECK_VM_STACK_OVERFLOW0(cfp,sp,margin) WHEN_VM_STACK_OVERFLOWED(cfp, sp, margin) vm_stackoverflow()
18813#define CHECK_VM_STACK_OVERFLOW(cfp,margin) WHEN_VM_STACK_OVERFLOWED(cfp, (cfp)->sp, margin) vm_stackoverflow()
18814#pragma GCC visibility push(default)
18815#pragma GCC visibility pop
18816#define GET_VM() rb_current_vm()
18817#define GET_THREAD() rb_current_thread()
18818#define GET_EC() rb_current_execution_context()
18819#define RUBY_VM_SET_TIMER_INTERRUPT(ec) ATOMIC_OR((ec)->interrupt_flag, TIMER_INTERRUPT_MASK)
18820#define RUBY_VM_SET_INTERRUPT(ec) ATOMIC_OR((ec)->interrupt_flag, PENDING_INTERRUPT_MASK)
18821#define RUBY_VM_SET_POSTPONED_JOB_INTERRUPT(ec) ATOMIC_OR((ec)->interrupt_flag, POSTPONED_JOB_INTERRUPT_MASK)
18822#define RUBY_VM_SET_TRAP_INTERRUPT(ec) ATOMIC_OR((ec)->interrupt_flag, TRAP_INTERRUPT_MASK)
18823#define RUBY_VM_INTERRUPTED(ec) ((ec)->interrupt_flag & ~(ec)->interrupt_mask & (PENDING_INTERRUPT_MASK|TRAP_INTERRUPT_MASK))
18824#define RUBY_VM_INTERRUPTED_ANY(ec) ((ec)->interrupt_flag & ~(ec)->interrupt_mask)
18825#define RUBY_VM_CHECK_INTS(ec) rb_vm_check_ints(ec)
18826#define EXEC_EVENT_HOOK_ORIG(ec_,hooks_,flag_,self_,id_,called_id_,klass_,data_,pop_p_) do { const rb_event_flag_t flag_arg_ = (flag_); rb_hook_list_t *hooks_arg_ = (hooks_); if (UNLIKELY((hooks_arg_)->events & (flag_arg_))) { rb_exec_event_hook_orig(ec_, hooks_arg_, flag_arg_, self_, id_, called_id_, klass_, data_, pop_p_); } } while (0)
18827#define EXEC_EVENT_HOOK(ec_,flag_,self_,id_,called_id_,klass_,data_) EXEC_EVENT_HOOK_ORIG(ec_, rb_vm_global_hooks(ec_), flag_, self_, id_, called_id_, klass_, data_, 0)
18828#define EXEC_EVENT_HOOK_AND_POP_FRAME(ec_,flag_,self_,id_,called_id_,klass_,data_) EXEC_EVENT_HOOK_ORIG(ec_, rb_vm_global_hooks(ec_), flag_, self_, id_, called_id_, klass_, data_, 1)
18829#pragma GCC visibility push(default)
18830#define RUBY_EVENT_COVERAGE_LINE 0x010000
18831#define RUBY_EVENT_COVERAGE_BRANCH 0x020000
18832#pragma GCC visibility pop
18833#define RUBY_DEBUG_H
18834#pragma GCC visibility push(default)
18835#define dpv(h,v) ruby_debug_print_value(-1, 0, (h), (v))
18836#define dp(v) ruby_debug_print_value(-1, 0, "", (v))
18837#define dpi(i) ruby_debug_print_id(-1, 0, "", (i))
18838#define dpn(n) ruby_debug_print_node(-1, 0, "", (n))
18839#define bp() ruby_debug_breakpoint()
18840#pragma GCC visibility pop
18841#define RUBY_ISEQ_H 1
18842#define ISEQ_MAJOR_VERSION ((unsigned int)ruby_api_version[0])
18843#define ISEQ_MINOR_VERSION ((unsigned int)ruby_api_version[1])
18844#define ISEQ_COVERAGE(iseq) iseq->body->variable.coverage
18845#define ISEQ_COVERAGE_SET(iseq,cov) RB_OBJ_WRITE(iseq, &iseq->body->variable.coverage, cov)
18846#define ISEQ_LINE_COVERAGE(iseq) RARRAY_AREF(ISEQ_COVERAGE(iseq), COVERAGE_INDEX_LINES)
18847#define ISEQ_BRANCH_COVERAGE(iseq) RARRAY_AREF(ISEQ_COVERAGE(iseq), COVERAGE_INDEX_BRANCHES)
18848#define ISEQ_PC2BRANCHINDEX(iseq) iseq->body->variable.pc2branchindex
18849#define ISEQ_PC2BRANCHINDEX_SET(iseq,h) RB_OBJ_WRITE(iseq, &iseq->body->variable.pc2branchindex, h)
18850#define ISEQ_FLIP_CNT(iseq) (iseq)->body->variable.flip_count
18851#define ISEQ_TRACE_EVENTS (RUBY_EVENT_LINE | RUBY_EVENT_CLASS | RUBY_EVENT_END | RUBY_EVENT_CALL | RUBY_EVENT_RETURN| RUBY_EVENT_B_CALL| RUBY_EVENT_B_RETURN| RUBY_EVENT_COVERAGE_LINE| RUBY_EVENT_COVERAGE_BRANCH)
18852#define ISEQ_NOT_LOADED_YET IMEMO_FL_USER1
18853#define ISEQ_USE_COMPILE_DATA IMEMO_FL_USER2
18854#define ISEQ_TRANSLATED IMEMO_FL_USER3
18855#define ISEQ_MARKABLE_ISEQ IMEMO_FL_USER4
18856#define ISEQ_EXECUTABLE_P(iseq) (FL_TEST_RAW((iseq), ISEQ_NOT_LOADED_YET | ISEQ_USE_COMPILE_DATA) == 0)
18857#pragma GCC visibility push(default)
18858#define INITIAL_ISEQ_COMPILE_DATA_STORAGE_BUFF_SIZE (512)
18859#pragma GCC visibility pop
18860#define RUBY_EVAL_INTERN_H
18861#define PASS_PASSED_BLOCK_HANDLER_EC(ec) pass_passed_block_handler(ec)
18862#define PASS_PASSED_BLOCK_HANDLER() pass_passed_block_handler(GET_EC())
18863#define ruby_setjmp(env) RUBY_SETJMP(env)
18864#define ruby_longjmp(env,val) RUBY_LONGJMP((env),(val))
18865#define _ERRNO_H 1
18866#define _BITS_ERRNO_H 1
18867#define _ASM_GENERIC_ERRNO_H
18868#define _ASM_GENERIC_ERRNO_BASE_H
18869#define EPERM 1
18870#define ENOENT 2
18871#define ESRCH 3
18872#define EINTR 4
18873#define EIO 5
18874#define ENXIO 6
18875#define E2BIG 7
18876#define ENOEXEC 8
18877#define EBADF 9
18878#define ECHILD 10
18879#define EAGAIN 11
18880#define ENOMEM 12
18881#define EACCES 13
18882#define EFAULT 14
18883#define ENOTBLK 15
18884#define EBUSY 16
18885#define EEXIST 17
18886#define EXDEV 18
18887#define ENODEV 19
18888#define ENOTDIR 20
18889#define EISDIR 21
18890#define EINVAL 22
18891#define ENFILE 23
18892#define EMFILE 24
18893#define ENOTTY 25
18894#define ETXTBSY 26
18895#define EFBIG 27
18896#define ENOSPC 28
18897#define ESPIPE 29
18898#define EROFS 30
18899#define EMLINK 31
18900#define EPIPE 32
18901#define EDOM 33
18902#define ERANGE 34
18903#define EDEADLK 35
18904#define ENAMETOOLONG 36
18905#define ENOLCK 37
18906#define ENOSYS 38
18907#define ENOTEMPTY 39
18908#define ELOOP 40
18909#define EWOULDBLOCK EAGAIN
18910#define ENOMSG 42
18911#define EIDRM 43
18912#define ECHRNG 44
18913#define EL2NSYNC 45
18914#define EL3HLT 46
18915#define EL3RST 47
18916#define ELNRNG 48
18917#define EUNATCH 49
18918#define ENOCSI 50
18919#define EL2HLT 51
18920#define EBADE 52
18921#define EBADR 53
18922#define EXFULL 54
18923#define ENOANO 55
18924#define EBADRQC 56
18925#define EBADSLT 57
18926#define EDEADLOCK EDEADLK
18927#define EBFONT 59
18928#define ENOSTR 60
18929#define ENODATA 61
18930#define ETIME 62
18931#define ENOSR 63
18932#define ENONET 64
18933#define ENOPKG 65
18934#define EREMOTE 66
18935#define ENOLINK 67
18936#define EADV 68
18937#define ESRMNT 69
18938#define ECOMM 70
18939#define EPROTO 71
18940#define EMULTIHOP 72
18941#define EDOTDOT 73
18942#define EBADMSG 74
18943#define EOVERFLOW 75
18944#define ENOTUNIQ 76
18945#define EBADFD 77
18946#define EREMCHG 78
18947#define ELIBACC 79
18948#define ELIBBAD 80
18949#define ELIBSCN 81
18950#define ELIBMAX 82
18951#define ELIBEXEC 83
18952#define EILSEQ 84
18953#define ERESTART 85
18954#define ESTRPIPE 86
18955#define EUSERS 87
18956#define ENOTSOCK 88
18957#define EDESTADDRREQ 89
18958#define EMSGSIZE 90
18959#define EPROTOTYPE 91
18960#define ENOPROTOOPT 92
18961#define EPROTONOSUPPORT 93
18962#define ESOCKTNOSUPPORT 94
18963#define EOPNOTSUPP 95
18964#define EPFNOSUPPORT 96
18965#define EAFNOSUPPORT 97
18966#define EADDRINUSE 98
18967#define EADDRNOTAVAIL 99
18968#define ENETDOWN 100
18969#define ENETUNREACH 101
18970#define ENETRESET 102
18971#define ECONNABORTED 103
18972#define ECONNRESET 104
18973#define ENOBUFS 105
18974#define EISCONN 106
18975#define ENOTCONN 107
18976#define ESHUTDOWN 108
18977#define ETOOMANYREFS 109
18978#define ETIMEDOUT 110
18979#define ECONNREFUSED 111
18980#define EHOSTDOWN 112
18981#define EHOSTUNREACH 113
18982#define EALREADY 114
18983#define EINPROGRESS 115
18984#define ESTALE 116
18985#define EUCLEAN 117
18986#define ENOTNAM 118
18987#define ENAVAIL 119
18988#define EISNAM 120
18989#define EREMOTEIO 121
18990#define EDQUOT 122
18991#define ENOMEDIUM 123
18992#define EMEDIUMTYPE 124
18993#define ECANCELED 125
18994#define ENOKEY 126
18995#define EKEYEXPIRED 127
18996#define EKEYREVOKED 128
18997#define EKEYREJECTED 129
18998#define EOWNERDEAD 130
18999#define ENOTRECOVERABLE 131
19000#define ERFKILL 132
19001#define EHWPOISON 133
19002#define ENOTSUP EOPNOTSUPP
19003#define errno (*__errno_location ())
19004#define __error_t_defined 1
19005#define _SYS_PARAM_H 1
19006#define __need_NULL
19007#undef __need_ptrdiff_t
19008#undef __need_size_t
19009#undef __need_wchar_t
19010#undef NULL
19011#define NULL ((void *)0)
19012#undef __need_NULL
19013#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER)
19014#define __undef_ARG_MAX
19015#define _LINUX_PARAM_H
19016#define __ASM_GENERIC_PARAM_H
19017#define HZ 100
19018#define EXEC_PAGESIZE 4096
19019#define NOGROUP (-1)
19020#define MAXHOSTNAMELEN 64
19021#undef ARG_MAX
19022#undef __undef_ARG_MAX
19023#define MAXSYMLINKS 20
19024#define NOFILE 256
19025#define NCARGS 131072
19026#define NBBY CHAR_BIT
19027#define NGROUPS NGROUPS_MAX
19028#define CANBSIZ MAX_CANON
19029#define MAXPATHLEN PATH_MAX
19030#define NODEV ((dev_t) -1)
19031#define DEV_BSIZE 512
19032#define setbit(a,i) ((a)[(i)/NBBY] |= 1<<((i)%NBBY))
19033#define clrbit(a,i) ((a)[(i)/NBBY] &= ~(1<<((i)%NBBY)))
19034#define isset(a,i) ((a)[(i)/NBBY] & (1<<((i)%NBBY)))
19035#define isclr(a,i) (((a)[(i)/NBBY] & (1<<((i)%NBBY))) == 0)
19036#define howmany(x,y) (((x) + ((y) - 1)) / (y))
19037#define roundup(x,y) (__builtin_constant_p (y) && powerof2 (y) ? (((x) + (y) - 1) & ~((y) - 1)) : ((((x) + ((y) - 1)) / (y)) * (y)))
19038#define powerof2(x) ((((x) - 1) & (x)) == 0)
19039#define MIN(a,b) (((a)<(b))?(a):(b))
19040#define MAX(a,b) (((a)>(b))?(a):(b))
19041#define SAVE_ROOT_JMPBUF_BEFORE_STMT
19042#define SAVE_ROOT_JMPBUF_AFTER_STMT
19043#define SAVE_ROOT_JMPBUF(th,stmt) do if (ruby_setjmp((th)->root_jmpbuf) == 0) { SAVE_ROOT_JMPBUF_BEFORE_STMT stmt; SAVE_ROOT_JMPBUF_AFTER_STMT } else { rb_fiber_start(); } while (0)
19044#define EC_PUSH_TAG(ec) do { rb_execution_context_t * const _ec = (ec); struct rb_vm_tag _tag; _tag.state = TAG_NONE; _tag.tag = Qundef; _tag.prev = _ec->tag;
19045#define EC_POP_TAG() _ec->tag = _tag.prev; } while (0)
19046#define EC_TMPPOP_TAG() _ec->tag = _tag.prev
19047#define EC_REPUSH_TAG() (void)(_ec->tag = &_tag)
19048#define VAR_FROM_MEMORY(var) (var)
19049#define VAR_INITIALIZED(var) ((void)&(var))
19050#define VAR_NOCLOBBERED(var) var
19051#define UNALIGNED_MEMBER_ACCESS(expr) expr
19052#define UNALIGNED_MEMBER_PTR(ptr,mem) UNALIGNED_MEMBER_ACCESS(&(ptr)->mem)
19053#undef RB_OBJ_WRITE
19054#define RB_OBJ_WRITE(a,slot,b) UNALIGNED_MEMBER_ACCESS(rb_obj_write((VALUE)(a), (VALUE *)(slot), (VALUE)(b), __FILE__, __LINE__))
19055#define EC_EXEC_TAG() (ruby_setjmp(_tag.buf) ? rb_ec_tag_state(VAR_FROM_MEMORY(_ec)) : (EC_REPUSH_TAG(), 0))
19056#define EC_JUMP_TAG(ec,st) rb_ec_tag_jump(ec, st)
19057#define INTERNAL_EXCEPTION_P(exc) FIXNUM_P(exc)
19058#define CREF_FL_PUSHED_BY_EVAL IMEMO_FL_USER1
19059#define CREF_FL_OMOD_SHARED IMEMO_FL_USER2
19060#define rb_ec_raised_set(ec,f) ((ec)->raised_flag |= (f))
19061#define rb_ec_raised_reset(ec,f) ((ec)->raised_flag &= ~(f))
19062#define rb_ec_raised_p(ec,f) (((ec)->raised_flag & (f)) != 0)
19063#define rb_ec_raised_clear(ec) ((ec)->raised_flag = 0)
19064#define CharNext(p) ((p) + mblen((p), RUBY_MBCHAR_MAXSIZE))
19065#define _PROBES_H
19066#define DTRACE_PROBES_DISABLED 1
19067#define RUBY_DTRACE_METHOD_ENTRY_ENABLED() 0
19068#define RUBY_DTRACE_METHOD_ENTRY(classname,methodname,filename,lineno) do {} while (0)
19069#define RUBY_DTRACE_METHOD_RETURN_ENABLED() 0
19070#define RUBY_DTRACE_METHOD_RETURN(classname,methodname,filename,lineno) do {} while (0)
19071#define RUBY_DTRACE_CMETHOD_ENTRY_ENABLED() 0
19072#define RUBY_DTRACE_CMETHOD_ENTRY(classname,methodname,filename,lineno) do {} while (0)
19073#define RUBY_DTRACE_CMETHOD_RETURN_ENABLED() 0
19074#define RUBY_DTRACE_CMETHOD_RETURN(classname,methodname,filename,lineno) do {} while (0)
19075#define RUBY_DTRACE_REQUIRE_ENTRY_ENABLED() 0
19076#define RUBY_DTRACE_REQUIRE_ENTRY(rquiredfile,filename,lineno) do {} while (0)
19077#define RUBY_DTRACE_REQUIRE_RETURN_ENABLED() 0
19078#define RUBY_DTRACE_REQUIRE_RETURN(requiredfile,filename,lineno) do {} while (0)
19079#define RUBY_DTRACE_FIND_REQUIRE_ENTRY_ENABLED() 0
19080#define RUBY_DTRACE_FIND_REQUIRE_ENTRY(requiredfile,filename,lineno) do {} while (0)
19081#define RUBY_DTRACE_FIND_REQUIRE_RETURN_ENABLED() 0
19082#define RUBY_DTRACE_FIND_REQUIRE_RETURN(requiredfile,filename,lineno) do {} while (0)
19083#define RUBY_DTRACE_LOAD_ENTRY_ENABLED() 0
19084#define RUBY_DTRACE_LOAD_ENTRY(loadedfile,filename,lineno) do {} while (0)
19085#define RUBY_DTRACE_LOAD_RETURN_ENABLED() 0
19086#define RUBY_DTRACE_LOAD_RETURN(loadedfile,filename,lineno) do {} while (0)
19087#define RUBY_DTRACE_RAISE_ENABLED() 0
19088#define RUBY_DTRACE_RAISE(classname,filename,lineno) do {} while (0)
19089#define RUBY_DTRACE_OBJECT_CREATE_ENABLED() 0
19090#define RUBY_DTRACE_OBJECT_CREATE(classname,filename,lineno) do {} while (0)
19091#define RUBY_DTRACE_ARRAY_CREATE_ENABLED() 0
19092#define RUBY_DTRACE_ARRAY_CREATE(length,filename,lineno) do {} while (0)
19093#define RUBY_DTRACE_HASH_CREATE_ENABLED() 0
19094#define RUBY_DTRACE_HASH_CREATE(length,filename,lineno) do {} while (0)
19095#define RUBY_DTRACE_STRING_CREATE_ENABLED() 0
19096#define RUBY_DTRACE_STRING_CREATE(length,filename,lineno) do {} while (0)
19097#define RUBY_DTRACE_SYMBOL_CREATE_ENABLED() 0
19098#define RUBY_DTRACE_SYMBOL_CREATE(str,filename,lineno) do {} while (0)
19099#define RUBY_DTRACE_PARSE_BEGIN_ENABLED() 0
19100#define RUBY_DTRACE_PARSE_BEGIN(sourcefile,lineno) do {} while (0)
19101#define RUBY_DTRACE_PARSE_END_ENABLED() 0
19102#define RUBY_DTRACE_PARSE_END(sourcefile,lineno) do {} while (0)
19103#define RUBY_DTRACE_INSN_ENABLED() 0
19104#define RUBY_DTRACE_INSN(insns_name) do {} while (0)
19105#define RUBY_DTRACE_INSN_OPERAND_ENABLED() 0
19106#define RUBY_DTRACE_INSN_OPERAND(val,insns_name) do {} while (0)
19107#define RUBY_DTRACE_GC_MARK_BEGIN_ENABLED() 0
19108#define RUBY_DTRACE_GC_MARK_BEGIN() do {} while (0)
19109#define RUBY_DTRACE_GC_MARK_END_ENABLED() 0
19110#define RUBY_DTRACE_GC_MARK_END() do {} while (0)
19111#define RUBY_DTRACE_GC_SWEEP_BEGIN_ENABLED() 0
19112#define RUBY_DTRACE_GC_SWEEP_BEGIN() do {} while (0)
19113#define RUBY_DTRACE_GC_SWEEP_END_ENABLED() 0
19114#define RUBY_DTRACE_GC_SWEEP_END() do {} while (0)
19115#define RUBY_DTRACE_METHOD_CACHE_CLEAR_ENABLED() 0
19116#define RUBY_DTRACE_METHOD_CACHE_CLEAR(class,filename,lineno) do {} while (0)
19117#define RUBY_PROBES_HELPER_H
19118#define RUBY_DTRACE_METHOD_HOOK(name,ec,klazz,id) do { if (UNLIKELY(RUBY_DTRACE_ ##name ##_ENABLED())) { struct ruby_dtrace_method_hook_args args; if (rb_dtrace_setup(ec, klazz, id, &args)) { RUBY_DTRACE_ ##name(args.classname, args.methodname, args.filename, args.line_no); } } } while (0)
19119#define RUBY_DTRACE_METHOD_ENTRY_HOOK(ec,klass,id) RUBY_DTRACE_METHOD_HOOK(METHOD_ENTRY, ec, klass, id)
19120#define RUBY_DTRACE_METHOD_RETURN_HOOK(ec,klass,id) RUBY_DTRACE_METHOD_HOOK(METHOD_RETURN, ec, klass, id)
19121#define RUBY_DTRACE_CMETHOD_ENTRY_HOOK(ec,klass,id) RUBY_DTRACE_METHOD_HOOK(CMETHOD_ENTRY, ec, klass, id)
19122#define RUBY_DTRACE_CMETHOD_RETURN_HOOK(ec,klass,id) RUBY_DTRACE_METHOD_HOOK(CMETHOD_RETURN, ec, klass, id)
19123#define RUBY_MJIT_H 1
19124#pragma GCC visibility push(default)
19125#pragma GCC visibility pop
19126#define JIT_ISEQ_SIZE_THRESHOLD 1000
19127#define RUBY_INSNHELPER_H
19128#pragma GCC visibility push(default)
19129#pragma GCC visibility pop
19130#define COLLECT_USAGE_INSN(insn)
19131#define COLLECT_USAGE_OPERAND(insn,n,op)
19132#define COLLECT_USAGE_REGISTER(reg,s)
19133#define PUSH(x) (SET_SV(x), INC_SP(1))
19134#define TOPN(n) (*(GET_SP()-(n)-1))
19135#define POPN(n) (DEC_SP(n))
19136#define POP() (DEC_SP(1))
19137#define STACK_ADDR_FROM_TOP(n) (GET_SP()-(n))
19138#define GET_TOS() (tos)
19139#define VM_REG_CFP (reg_cfp)
19140#define VM_REG_PC (VM_REG_CFP->pc)
19141#define VM_REG_SP (VM_REG_CFP->sp)
19142#define VM_REG_EP (VM_REG_CFP->ep)
19143#define RESTORE_REGS() do { VM_REG_CFP = ec->cfp; } while (0)
19144#define REG_A reg_a
19145#define REG_B reg_b
19146#define COLLECT_USAGE_REGISTER_HELPER(a,b,v) (v)
19147#define GET_PC() (COLLECT_USAGE_REGISTER_HELPER(PC, GET, VM_REG_PC))
19148#define SET_PC(x) (VM_REG_PC = (COLLECT_USAGE_REGISTER_HELPER(PC, SET, (x))))
19149#define GET_CURRENT_INSN() (*GET_PC())
19150#define GET_OPERAND(n) (GET_PC()[(n)])
19151#define ADD_PC(n) (SET_PC(VM_REG_PC + (n)))
19152#define JUMP(dst) (SET_PC(VM_REG_PC + (dst)))
19153#define GET_CFP() (COLLECT_USAGE_REGISTER_HELPER(CFP, GET, VM_REG_CFP))
19154#define GET_EP() (COLLECT_USAGE_REGISTER_HELPER(EP, GET, VM_REG_EP))
19155#define SET_EP(x) (VM_REG_EP = (COLLECT_USAGE_REGISTER_HELPER(EP, SET, (x))))
19156#define GET_LEP() (VM_EP_LEP(GET_EP()))
19157#define GET_SP() (COLLECT_USAGE_REGISTER_HELPER(SP, GET, VM_REG_SP))
19158#define SET_SP(x) (VM_REG_SP = (COLLECT_USAGE_REGISTER_HELPER(SP, SET, (x))))
19159#define INC_SP(x) (VM_REG_SP += (COLLECT_USAGE_REGISTER_HELPER(SP, SET, (x))))
19160#define DEC_SP(x) (VM_REG_SP -= (COLLECT_USAGE_REGISTER_HELPER(SP, SET, (x))))
19161#define SET_SV(x) (*GET_SP() = (x))
19162#define GET_ISEQ() (GET_CFP()->iseq)
19163#define GET_PREV_EP(ep) ((VALUE *)((ep)[VM_ENV_DATA_INDEX_SPECVAL] & ~0x03))
19164#define GET_GLOBAL(entry) rb_gvar_get((struct rb_global_entry*)(entry))
19165#define SET_GLOBAL(entry,val) rb_gvar_set((struct rb_global_entry*)(entry), (val))
19166#define GET_CONST_INLINE_CACHE(dst) ((IC) * (GET_PC() + (dst) + 2))
19167#define GET_SELF() (COLLECT_USAGE_REGISTER_HELPER(SELF, GET, GET_CFP()->self))
19168#define EXEC_EC_CFP(val) do { if (ec->cfp->iseq->body->catch_except_p) { VM_ENV_FLAGS_SET(ec->cfp->ep, VM_FRAME_FLAG_FINISH); val = vm_exec(ec, TRUE); } else if ((val = mjit_exec(ec)) == Qundef) { VM_ENV_FLAGS_SET(ec->cfp->ep, VM_FRAME_FLAG_FINISH); val = vm_exec(ec, FALSE); } } while (0)
19169#define CALL_METHOD(calling,ci,cc) do { VALUE v = (*(cc)->call)(ec, GET_CFP(), (calling), (ci), (cc)); if (v == Qundef) { EXEC_EC_CFP(val); } else { val = v; } } while (0)
19170#define CC_SET_FASTPATH(cc,func,enabled) do { if (LIKELY(enabled)) ((cc)->call = (func)); } while (0)
19171#define GET_BLOCK_HANDLER() (GET_LEP()[VM_ENV_DATA_INDEX_SPECVAL])
19172#define SETUP_CANARY()
19173#define CHECK_CANARY()
19174#define FIXNUM_2_P(a,b) ((a) & (b) & 1)
19175#define FLONUM_2_P(a,b) (((((a)^2) | ((b)^2)) & 3) == 0)
19176#define FLOAT_HEAP_P(x) (!SPECIAL_CONST_P(x) && RBASIC_CLASS(x) == rb_cFloat)
19177#define FLOAT_INSTANCE_P(x) (FLONUM_P(x) || FLOAT_HEAP_P(x))
19178#define USE_IC_FOR_SPECIALIZED_METHOD 1
19179#define NEXT_CLASS_SERIAL() (++ruby_vm_class_serial)
19180#define GET_GLOBAL_METHOD_STATE() (ruby_vm_global_method_state)
19181#define INC_GLOBAL_METHOD_STATE() (++ruby_vm_global_method_state)
19182#define GET_GLOBAL_CONSTANT_STATE() (ruby_vm_global_constant_state)
19183#define INC_GLOBAL_CONSTANT_STATE() (++ruby_vm_global_constant_state)
19184#define IS_ARGS_SPLAT(ci) ((ci)->flag & VM_CALL_ARGS_SPLAT)
19185#define IS_ARGS_KEYWORD(ci) ((ci)->flag & VM_CALL_KWARG)
19186#define CALLER_SETUP_ARG(cfp,calling,ci) do { if (UNLIKELY(IS_ARGS_SPLAT(ci))) vm_caller_setup_arg_splat((cfp), (calling)); if (UNLIKELY(IS_ARGS_KEYWORD(ci))) vm_caller_setup_arg_kw((cfp), (calling), (ci)); } while (0)
19187#define RUBY_VM_EXEC_H
19188#define PREFETCH(pc)
19189#define debugs
19190#define DEBUG_ENTER_INSN(insn)
19191#define DEBUG_END_INSN()
19192#define throwdebug if(0)printf
19193#define LABEL(x) INSN_LABEL_ ##x
19194#define ELABEL(x) INSN_ELABEL_ ##x
19195#define LABEL_PTR(x) RB_GNUC_EXTENSION(&&LABEL(x))
19196#define INSN_ENTRY_SIG(insn) if (0) fprintf(stderr, "exec: %s@(%d, %d)@%s:%d\n", #insn, (int)(reg_pc - reg_cfp->iseq->body->iseq_encoded), (int)(reg_cfp->pc - reg_cfp->iseq->body->iseq_encoded), RSTRING_PTR(rb_iseq_path(reg_cfp->iseq)), (int)(rb_iseq_line_no(reg_cfp->iseq, reg_pc - reg_cfp->iseq->body->iseq_encoded)));
19197#define INSN_DISPATCH_SIG(insn)
19198#define INSN_ENTRY(insn) LABEL(insn): INSN_ENTRY_SIG(insn);
19199#define DISPATCH_ARCH_DEPEND_WAY(addr)
19200#define TC_DISPATCH(insn) INSN_DISPATCH_SIG(insn); RB_GNUC_EXTENSION_BLOCK(goto *(void const *)GET_CURRENT_INSN()); ;
19201#define END_INSN(insn) DEBUG_END_INSN(); TC_DISPATCH(insn);
19202#define INSN_DISPATCH() TC_DISPATCH(__START__) {
19203#define END_INSNS_DISPATCH() rb_bug("unknown insn: %"PRIdVALUE, GET_CURRENT_INSN()); }
19204#define NEXT_INSN() TC_DISPATCH(__NEXT_INSN__)
19205#define START_OF_ORIGINAL_INSN(x) start_of_ ##x:
19206#define DISPATCH_ORIGINAL_INSN(x) goto start_of_ ##x;
19207#define VM_SP_CNT(ec,sp) ((sp) - (ec)->vm_stack)
19208#define THROW_EXCEPTION(exc) do { ec->errinfo = (VALUE)(exc); EC_JUMP_TAG(ec, ec->tag->state); } while (0)
19209#define SCREG(r) (reg_ ##r)
19210#define VM_DEBUG_STACKOVERFLOW 0
19211#define CHECK_VM_STACK_OVERFLOW_FOR_INSN(cfp,margin)
19212#define INSN_LABEL2(insn,name) INSN_LABEL_ ## insn ## _ ## name
19213#define INSN_LABEL(x) INSN_LABEL2(NAME_OF_CURRENT_INSN, x)
19214#define BIN(n) YARVINSN_ ##n
19215#define ASSERT_VM_INSTRUCTION_SIZE(array) STATIC_ASSERT(numberof_ ##array, numberof(array) == VM_INSTRUCTION_SIZE)
19216#define CONSTANT_H
19217#define RB_CONST_PRIVATE_P(ce) (((ce)->flag & CONST_VISIBILITY_MASK) == CONST_PRIVATE)
19218#define RB_CONST_PUBLIC_P(ce) (((ce)->flag & CONST_VISIBILITY_MASK) == CONST_PUBLIC)
19219#define RB_CONST_DEPRECATED_P(ce) ((ce)->flag & CONST_DEPRECATED)
19220#define USE_DEBUG_COUNTER 0
19221#define RUBY_DEBUG_COUNTER_H 1
19222#define RB_DEBUG_COUNTER(name) RB_DEBUG_COUNTER_ ##name,
19223#undef RB_DEBUG_COUNTER
19224#define RB_DEBUG_COUNTER_INC(type) ((void)0)
19225#define RB_DEBUG_COUNTER_INC_UNLESS(type,cond) (cond)
19226#define RB_DEBUG_COUNTER_INC_IF(type,cond) (cond)
19227#define vm_check_frame(a,b,c,d)
19228#define BUILTIN_CLASS_P(x,k) (!SPECIAL_CONST_P(x) && RBASIC_CLASS(x) == k)
19229#define EQ_UNREDEFINED_P(t) BASIC_OP_UNREDEFINED_P(BOP_EQ, t ##_REDEFINED_OP_FLAG)
19230#undef BUILTIN_CLASS_P
19231#undef EQ_UNREDEFINED_P
19232#define CHECK_CMP_NAN(a,b)
19233#define KW_SPECIFIED_BITS_MAX (32-1)
19234#define CHECK_CFP_CONSISTENCY(func) (LIKELY(vm_cfp_consistent_p(ec, reg_cfp)) ? (void)0 : rb_bug(func ": cfp consistency error (%p, %p)", (void *)reg_cfp, (void *)(ec->cfp+1)))
19235#define id_cmp idCmp
19236#undef id_cmp
19237#define VM_TRACE_HOOK(target_event,val) do { if ((pc_events & (target_event)) & enabled_flags) { vm_trace_hook(ec, reg_cfp, pc, pc_events, (target_event), global_hooks, local_hooks, (val)); } } while (0)
19238#define id_mesg idMesg
std::atomic< unsigned > rb_atomic_t
Type that is eligible for atomic operations.
Definition: atomic.h:69
static char rb_num2char_inline(VALUE x)
Converts an instance of rb_cNumeric into C's char.
Definition: char.h:73
static int rb_isdigit(int c)
Our own locale-insensitive version of isdigit(3).
Definition: ctype.h:302
static int rb_isupper(int c)
Our own locale-insensitive version of isupper(3).
Definition: ctype.h:232
static int rb_iscntrl(int c)
Our own locale-insensitive version of iscntrl(3).
Definition: ctype.h:418
int st_locale_insensitive_strcasecmp(const char *s1, const char *s2)
Our own locale-insensitive version of strcasecmp(3).
Definition: st.c:1937
static int rb_ispunct(int c)
Our own locale-insensitive version of ispunct(3).
Definition: ctype.h:465
static int rb_isalnum(int c)
Our own locale-insensitive version of isalnum(3).
Definition: ctype.h:326
static int rb_isxdigit(int c)
Our own locale-insensitive version of isxdigit(3).
Definition: ctype.h:349
static int rb_isspace(int c)
Our own locale-insensitive version of isspace(3).
Definition: ctype.h:395
static int rb_isascii(int c)
Our own locale-insensitive version of isascii(3).
Definition: ctype.h:209
static int rb_toupper(int c)
Our own locale-insensitive version of toupper(3).
Definition: ctype.h:539
unsigned long ruby_strtoul(const char *str, char **endptr, int base)
Our own locale-insensitive version of strtoul(3).
Definition: util.c:133
static int rb_tolower(int c)
Our own locale-insensitive version of tolower(3).
Definition: ctype.h:514
int st_locale_insensitive_strncasecmp(const char *s1, const char *s2, size_t n)
Our own locale-insensitive version of strcnasecmp(3).
Definition: st.c:1961
static int rb_isgraph(int c)
Our own locale-insensitive version of isgraph(3).
Definition: ctype.h:489
static int rb_isalpha(int c)
Our own locale-insensitive version of isalpha(3).
Definition: ctype.h:279
static int rb_islower(int c)
Our own locale-insensitive version of islower(3).
Definition: ctype.h:255
static int rb_isprint(int c)
Identical to rb_isgraph(), except it also returns true for ‘’ '`.
Definition: ctype.h:442
static int rb_isblank(int c)
Our own locale-insensitive version of isblank(3).
Definition: ctype.h:372
#define rb_define_method_id(klass, mid, func, arity)
Defines klass#mid.
Definition: cxxanyargs.hpp:673
#define rb_define_singleton_method(klass, mid, func, arity)
Defines klass.mid.
Definition: cxxanyargs.hpp:685
#define rb_define_protected_method(klass, mid, func, arity)
Defines klass#mid and makes it protected.
Definition: cxxanyargs.hpp:681
#define rb_define_private_method(klass, mid, func, arity)
Defines klass#mid and makes it private.
Definition: cxxanyargs.hpp:677
double rb_float_value(VALUE num)
Extracts its double value from an instance of rb_cFloat.
Definition: numeric.c:6418
VALUE rb_float_new_in_heap(double d)
Identical to rb_float_new(), except it does not generate Flonums.
Definition: numeric.c:1014
VALUE rb_float_new(double d)
Converts a C's double into an instance of rb_cFloat.
Definition: numeric.c:6425
void rb_add_event_hook(rb_event_hook_func_t func, rb_event_flag_t events, VALUE data)
Registers an event hook function.
Definition: vm_trace.c:186
int rb_remove_event_hook(rb_event_hook_func_t func)
Removes the passed function from the list of event hooks.
Definition: vm_trace.c:294
void(* rb_event_hook_func_t)(rb_event_flag_t evflag, VALUE data, VALUE self, ID mid, VALUE klass)
Type of event hooks.
Definition: event.h:115
uint32_t rb_event_flag_t
Represents event(s).
Definition: event.h:103
@ RUBY_FL_USHIFT
Number of bits in ruby_fl_type that are not open to users.
Definition: fl_type.h:167
static void rb_obj_freeze_inline(VALUE x)
Prevents further modifications to the given object.
Definition: fl_type.h:951
@ RUBY_FL_DUPPED
Definition: fl_type.h:439
@ RUBY_FL_PROMOTED1
This flag has something to do with our garbage collector.
Definition: fl_type.h:240
@ RUBY_ELTS_SHARED
This flag has something to do with data structures.
Definition: fl_type.h:405
@ RUBY_FL_USER9
User-defined flag.
Definition: fl_type.h:369
@ RUBY_FL_SINGLETON
This flag has something to do with an object's class.
Definition: fl_type.h:430
@ RUBY_FL_USER8
User-defined flag.
Definition: fl_type.h:368
@ RUBY_FL_USER11
User-defined flag.
Definition: fl_type.h:371
@ RUBY_FL_USER5
User-defined flag.
Definition: fl_type.h:365
@ RUBY_FL_TAINT
Definition: fl_type.h:278
@ RUBY_FL_USER3
User-defined flag.
Definition: fl_type.h:363
@ RUBY_FL_USER17
User-defined flag.
Definition: fl_type.h:377
@ RUBY_FL_USER10
User-defined flag.
Definition: fl_type.h:370
@ RUBY_FL_USER7
User-defined flag.
Definition: fl_type.h:367
@ RUBY_FL_WB_PROTECTED
Definition: fl_type.h:207
@ RUBY_FL_PROMOTED0
This flag has something to do with our garbage collector.
Definition: fl_type.h:223
@ RUBY_FL_USER14
User-defined flag.
Definition: fl_type.h:374
@ RUBY_FL_USER6
User-defined flag.
Definition: fl_type.h:366
@ RUBY_FL_USER16
User-defined flag.
Definition: fl_type.h:376
@ RUBY_FL_EXIVAR
This flag has something to do with instance variables.
Definition: fl_type.h:345
@ RUBY_FL_UNTRUSTED
Definition: fl_type.h:305
@ RUBY_FL_PROMOTED
This flag has something to do with our garbage collector.
Definition: fl_type.h:257
@ RUBY_FL_USER0
User-defined flag.
Definition: fl_type.h:360
@ RUBY_FL_FREEZE
This flag has something to do with data immutability.
Definition: fl_type.h:356
@ RUBY_FL_USER15
User-defined flag.
Definition: fl_type.h:375
@ RUBY_FL_USER2
User-defined flag.
Definition: fl_type.h:362
@ RUBY_FL_USER4
User-defined flag.
Definition: fl_type.h:364
@ RUBY_FL_USER18
User-defined flag.
Definition: fl_type.h:378
@ RUBY_FL_USER1
User-defined flag.
Definition: fl_type.h:361
@ RUBY_FL_FINALIZE
This flag has something to do with finalisers.
Definition: fl_type.h:271
@ RUBY_FL_USER19
User-defined flag.
Definition: fl_type.h:380
@ RUBY_FL_USER13
User-defined flag.
Definition: fl_type.h:373
@ RUBY_FL_USER12
User-defined flag.
Definition: fl_type.h:372
int ruby_glob(const char *pattern, int flags, ruby_glob_func *func, VALUE arg)
Identical to rb_glob(), except it returns opaque exception states instead of raising exceptions.
Definition: dir.c:2703
void rb_glob(const char *pattern, void(*func)(const char *path, VALUE arg, void *enc), VALUE arg)
The "glob" operator.
int ruby_brace_glob(const char *pattern, int flags, ruby_glob_func *func, VALUE arg)
Identical to ruby_glob(), @shyouhei currently suspects.
Definition: dir.c:2843
int ruby_glob_func(const char *path, VALUE arg, void *enc)
Type of a glob callback function.
Definition: glob.h:49
void rb_include_module(VALUE, VALUE)
Includes a module to a class.
Definition: class.c:1101
VALUE rb_define_class(const char *, VALUE)
Defines a top-level class.
Definition: class.c:896
void rb_extend_object(VALUE obj, VALUE module)
Extend the object with the module.
Definition: eval.c:1676
void rb_prepend_module(VALUE, VALUE)
Identical to rb_include_module(), except it "prepends" the passed module to the klass,...
Definition: class.c:1356
VALUE rb_define_class_under(VALUE, const char *, VALUE)
Defines a class under the namespace of outer.
Definition: class.c:928
VALUE rb_class_boot(VALUE)
A utility function that wraps class_alloc.
Definition: class.c:252
VALUE rb_define_module(const char *)
Defines a top-level module.
Definition: class.c:1006
void rb_class_modify_check(VALUE)
Asserts that klass is not a frozen class.
Definition: eval.c:422
VALUE rb_class_inherited(VALUE, VALUE)
Calls Class::inherited.
Definition: class.c:887
VALUE rb_define_module_under(VALUE, const char *)
Defines a module under the namespace of outer.
Definition: class.c:1030
VALUE rb_singleton_class_get(VALUE obj)
Returns the singleton class of obj, or nil if obj is not a singleton object.
Definition: class.c:2146
void rb_define_alias(VALUE, const char *, const char *)
Defines an alias of a method.
Definition: class.c:2208
void rb_define_module_function(VALUE module, const char *name, VALUE(*func)(ANYARGS), int argc)
Defines a module function for a module.
Definition: class.c:2192
void rb_need_block(void)
Declares that the current method needs a block.
Definition: eval.c:872
void rb_define_attr(VALUE, const char *, int, int)
Defines public accessor method(s) for an attribute.
Definition: class.c:2214
void rb_undef_method(VALUE, const char *)
Defines an undef of a method.
Definition: class.c:2030
void rb_define_method(VALUE klass, const char *name, VALUE(*func)(ANYARGS), int argc)
Defines a method.
Definition: class.c:2006
int rb_block_given_p(void)
Determines if the current method is given a block.
Definition: eval.c:851
void rb_define_global_function(const char *name, VALUE(*func)(ANYARGS), int argc)
Defines a global function.
Definition: class.c:2202
#define rb_str_buf_new2
Old name of rb_str_buf_new_cstr.
Definition: string.h:1679
VALUE rb_complex_polar(VALUE x, VALUE y)
Old name of rb_complex_new_polar.
Definition: complex.c:1541
void ruby_stop(int ex)
Calls ruby_cleanup() and exits the process.
Definition: eval.c:289
int ruby_exec_node(void *n)
Identical to ruby_run_node(), except it returns an opaque execution status.
Definition: eval.c:325
int ruby_setup(void)
Initializes the VM and builtin libraries.
Definition: eval.c:65
void ruby_finalize(void)
Runs the VM finalization processes.
Definition: eval.c:168
void ruby_init_stack(volatile VALUE *addr)
Set stack bottom of Ruby implementation.
void ruby_script(const char *name)
Sets the current script name to this value.
Definition: ruby.c:2495
void ruby_set_argv(int argc, char **argv)
Sets argv that ruby understands.
Definition: ruby.c:2610
void ruby_set_script_name(VALUE name)
Identical to ruby_script(), except it takes the name as a Ruby String instance.
Definition: ruby.c:2508
int ruby_cleanup(int ex)
Destructs the VM.
Definition: eval.c:176
size_t ruby_stack_length(VALUE **p)
Queries what Ruby thinks is the machine stack.
Definition: gc.c:6248
int ruby_stack_check(void)
Checks for stack overflow.
Definition: gc.c:6288
void ruby_init_loadpath(void)
Sets up $LOAD_PATH.
Definition: ruby.c:619
void * ruby_process_options(int argc, char **argv)
Identical to ruby_options(), except it raises ruby-level exceptions on failure.
Definition: ruby.c:2625
void ruby_prog_init(void)
Defines built-in variables.
Definition: ruby.c:2578
void ruby_sig_finalize(void)
Clear signal handlers.
Definition: signal.c:1497
void ruby_incpush(const char *path)
Appends the given path to the end of the load path.
Definition: ruby.c:458
void rb_notimplement(void)
Definition: error.c:3144
void rb_mod_sys_fail(VALUE mod, const char *mesg)
Identical to rb_sys_fail(), except it takes additional module to extend the exception object before r...
Definition: error.c:3280
VALUE rb_eLocalJumpError
LocalJumpError exception.
Definition: eval.c:48
void rb_raise(VALUE exc, const char *fmt,...)
Exception entry point.
Definition: error.c:3101
void rb_compile_warn(const char *file, int line, const char *fmt,...)
Identical to rb_compile_warning(), except it reports always regardless of runtime -W flag.
Definition: error.c:361
void rb_mod_syserr_fail(VALUE mod, int e, const char *mesg)
Identical to rb_mod_sys_fail(), except it does not depend on C global variable errno.
Definition: error.c:3294
VALUE rb_rescue2(VALUE(*b_proc)(VALUE), VALUE data1, VALUE(*r_proc)(VALUE, VALUE), VALUE data2,...)
An equivalent of rescue clause.
Definition: eval.c:880
void rb_exc_raise(VALUE mesg)
Raises an exception in the current thread.
Definition: eval.c:671
void rb_syserr_fail(int e, const char *mesg)
Raises appropriate exception that represents a C errno.
Definition: error.c:3213
void rb_bug(const char *fmt,...)
Interpreter panic switch.
Definition: error.c:803
void rb_iter_break(void)
Breaks from a block.
Definition: vm.c:1822
void rb_sys_fail(const char *mesg)
Converts a C errno into a Ruby exception, then raises it.
Definition: error.c:3225
VALUE rb_eZeroDivError
ZeroDivisionError exception.
Definition: numeric.c:194
void rb_readwrite_syserr_fail(enum rb_io_wait_readwrite waiting, int err, const char *msg)
Identical to rb_readwrite_sys_fail(), except it does not depend on C global variable errno.
Definition: io.c:14003
void rb_sys_warning(const char *fmt,...)
Identical to rb_sys_fail(), except it does not raise an exception to render a warning instead.
Definition: error.c:3362
VALUE rb_eIOError
IOError exception.
Definition: io.c:188
VALUE rb_syserr_new_str(int n, VALUE arg)
Identical to rb_syserr_new(), except it takes the message in Ruby's String instead of C's.
Definition: error.c:3207
void rb_mod_syserr_fail_str(VALUE mod, int e, VALUE mesg)
Identical to rb_mod_syserr_fail(), except it takes the message in Ruby's String instead of C's.
Definition: error.c:3301
void rb_error_frozen(const char *what)
Identical to rb_frozen_error_raise(), except its raising exception has a message like "can't modify f...
Definition: error.c:3417
void rb_set_errinfo(VALUE err)
Sets the current exception ($!) to the given value.
Definition: eval.c:1861
VALUE rb_eRegexpError
RegexpError exception.
Definition: re.c:30
void rb_syserr_fail_str(int e, VALUE mesg)
Identical to rb_syserr_fail(), except it takes the message in Ruby's String instead of C's.
Definition: error.c:3219
VALUE rb_eEOFError
EOFError exception.
Definition: io.c:187
void rb_fatal(const char *fmt,...)
Raises the unsung "fatal" exception.
Definition: error.c:3152
void rb_readwrite_sys_fail(enum rb_io_wait_readwrite waiting, const char *msg)
Raises appropriate exception using the parameters.
Definition: io.c:13997
void rb_iter_break_value(VALUE val)
Identical to rb_iter_break(), except it additionally takes the "value" of this breakage.
Definition: vm.c:1828
void rb_invalid_str(const char *str, const char *type)
Honestly I don't understand the name, but it raises an instance of rb_eArgError.
Definition: error.c:2160
void rb_exc_fatal(VALUE mesg)
Raises a fatal error in the current thread.
Definition: eval.c:684
VALUE * rb_ruby_verbose_ptr(void)
This is an implementation detail of ruby_verbose.
Definition: vm.c:4011
VALUE rb_eStopIteration
StopIteration exception.
Definition: enumerator.c:141
VALUE rb_eFloatDomainError
FloatDomainError exception.
Definition: numeric.c:195
const char void rb_warn(const char *,...)
Identical to rb_warning(), except it reports always regardless of runtime -W flag.
Definition: error.c:419
void rb_error_frozen_object(VALUE frozen_obj)
Identical to rb_error_frozen(), except it takes arbitrary Ruby object instead of C's string.
Definition: error.c:3449
void rb_bug_errno(const char *mesg, int errno_arg)
This is a wrapper of rb_bug() which automatically constructs appropriate message from the passed errn...
Definition: error.c:831
void rb_compile_warning(const char *file, int line, const char *fmt,...)
Issues a compile-time warning that happens at __file__:__line__.
Definition: error.c:376
VALUE rb_rescue(VALUE(*b_proc)(VALUE), VALUE data1, VALUE(*r_proc)(VALUE, VALUE), VALUE data2)
Identical to rb_rescue2(), except it does not take a list of exception classes.
Definition: eval.c:951
VALUE * rb_ruby_debug_ptr(void)
This is an implementation detail of ruby_debug.
Definition: vm.c:4018
VALUE rb_ensure(VALUE(*b_proc)(VALUE), VALUE data1, VALUE(*e_proc)(VALUE), VALUE data2)
An equivalent to ensure clause.
Definition: eval.c:980
VALUE rb_errinfo(void)
This is the same as $! in Ruby.
Definition: eval.c:1855
VALUE rb_eSysStackError
SystemStackError exception.
Definition: eval.c:49
VALUE rb_syserr_new(int, const char *)
Creates an exception object that represents the given C errno.
Definition: error.c:3199
void rb_sys_fail_str(VALUE mesg)
Identical to rb_sys_fail(), except it takes the message in Ruby's String instead of C's.
Definition: error.c:3231
void rb_unexpected_type(VALUE x, int t)
Fails with the given object's type incompatibility to the type.
Definition: error.c:1030
void rb_mod_sys_fail_str(VALUE mod, VALUE mesg)
Identical to rb_mod_sys_fail(), except it takes the message in Ruby's String instead of C's.
Definition: error.c:3287
VALUE rb_eThreadError
ThreadError exception.
Definition: eval.c:869
void rb_exit(int status)
Terminates the current execution context.
Definition: process.c:4503
VALUE rb_eMathDomainError
Math::DomainError exception.
Definition: math.c:30
void rb_check_type(VALUE x, int t)
This was the old implementation of Check_Type(), but they diverged.
Definition: error.c:1007
void rb_warning(const char *fmt,...)
Issues a warning.
Definition: error.c:450
VALUE rb_cRational
Rational class.
Definition: rational.c:47
VALUE rb_class_superclass(VALUE)
Returns the superclass of klass.
Definition: object.c:1963
VALUE rb_cUnboundMethod
UnboundMethod class.
Definition: proc.c:46
VALUE rb_cTime
Time class.
Definition: time.c:647
VALUE rb_cDir
Dir class.
Definition: dir.c:458
VALUE rb_cComplex
Complex class.
Definition: complex.c:38
VALUE rb_cArray
Array class.
Definition: array.c:40
VALUE rb_mProcess
Process module.
Definition: process.c:8764
VALUE rb_mMath
Math module.
Definition: math.c:29
VALUE rb_cIO
IO class.
Definition: io.c:186
VALUE rb_mEnumerable
Enumerable module.
Definition: enum.c:27
VALUE rb_cMatch
MatchData class.
Definition: re.c:956
VALUE rb_cStruct
Struct class.
Definition: struct.c:31
VALUE rb_cEnumerator
Enumerator class.
Definition: enumerator.c:126
VALUE rb_cInteger
Module class.
Definition: numeric.c:192
VALUE rb_stdin
STDIN constant.
Definition: io.c:199
VALUE rb_cStat
File::Stat class.
Definition: file.c:176
VALUE rb_Hash(VALUE)
Equivalent to Kernel#Hash in Ruby.
Definition: object.c:3661
VALUE rb_cBinding
Binding class.
Definition: proc.c:48
VALUE rb_cRegexp
Regexp class.
Definition: re.c:2459
VALUE rb_obj_frozen_p(VALUE obj)
Just calls RB_OBJ_FROZEN() inside.
Definition: object.c:1159
VALUE rb_mGC
GC module.
Definition: gc.c:1151
VALUE rb_obj_init_copy(VALUE, VALUE)
Default implementation of #initialize_copy.
Definition: object.c:501
VALUE rb_cHash
Hash class.
Definition: hash.c:92
VALUE rb_stderr
STDERR constant.
VALUE rb_cNumeric
Numeric class.
Definition: numeric.c:190
static VALUE rb_class_of(VALUE obj)
Object to class mapping function.
Definition: globals.h:172
VALUE rb_cRandom
Random class.
Definition: random.c:229
VALUE rb_cEncoding
Encoding class.
Definition: encoding.c:57
VALUE rb_cSymbol
Sumbol class.
Definition: string.c:80
VALUE rb_cThread
Thread class.
Definition: vm.c:401
VALUE rb_class_inherited_p(VALUE scion, VALUE ascendant)
Determines if the given two modules are relatives.
Definition: object.c:1575
VALUE rb_cRange
Range class.
Definition: range.c:31
VALUE rb_class_real(VALUE klass)
Finds a "real" class.
Definition: object.c:178
VALUE rb_mFileTest
FileTest module.
Definition: file.c:175
VALUE rb_mWaitReadable
IO::WaitReadable module.
Definition: io.c:189
VALUE rb_mWaitWritable
IO::WaitReadable module.
Definition: io.c:190
VALUE rb_mComparable
Comparable module.
Definition: compar.c:19
VALUE rb_class_search_ancestor(VALUE klass, VALUE super)
Internal header for Object.
Definition: object.c:810
VALUE rb_cFloat
Float class.
Definition: numeric.c:191
VALUE rb_cProc
Proc class.
Definition: proc.c:49
VALUE rb_cFile
File class.
Definition: file.c:174
VALUE rb_stdout
STDOUT constant.
VALUE rb_cString
String class.
Definition: string.c:79
VALUE rb_cMethod
Method class.
Definition: proc.c:47
int ruby_run_node(void *n)
Runs the given compiled source and exits this process.
Definition: eval.c:312
void ruby_init(void)
Calls ruby_setup() and check error.
Definition: eval.c:98
void * ruby_options(int argc, char **argv)
Processes command line arguments and compiles the Ruby source to execute.
Definition: eval.c:109
void ruby_show_copyright(void)
Prints the copyright notice of the CRuby interpreter to stdout.
Definition: version.c:145
void ruby_sysinit(int *argc, char ***argv)
Initializes the process for libruby.
Definition: ruby.c:2678
void ruby_show_version(void)
Prints the version information of the CRuby interpreter to stdout.
Definition: version.c:123
int ruby_executable_node(void *n, int *status)
Checks the return value of ruby_options().
Definition: eval.c:295
VALUE rb_eval_string_wrap(const char *str, int *state)
Identical to rb_eval_string_protect(), except it evaluates the given string under a module binding in...
Definition: vm_eval.c:1868
VALUE rb_funcall_passing_block(VALUE recv, ID mid, int argc, const VALUE *argv)
Identical to rb_funcallv_public(), except you can pass the passed block.
Definition: vm_eval.c:1165
VALUE rb_funcall(VALUE recv, ID mid, int n,...)
Calls a method.
Definition: vm_eval.c:1102
VALUE rb_funcallv(VALUE recv, ID mid, int argc, const VALUE *argv)
Identical to rb_funcall(), except it takes the method arguments as a C array.
Definition: vm_eval.c:1061
VALUE rb_funcall_with_block(VALUE recv, ID mid, int argc, const VALUE *argv, VALUE procval)
Identical to rb_funcallv_public(), except you can pass a block.
Definition: vm_eval.c:1179
VALUE rb_eval_string_protect(const char *str, int *state)
Identical to rb_eval_string(), except it avoids potential global escapes.
Definition: vm_eval.c:1847
VALUE rb_funcallv_public(VALUE recv, ID mid, int argc, const VALUE *argv)
Identical to rb_funcallv(), except it only takes public methods into account.
Definition: vm_eval.c:1153
VALUE rb_current_receiver(void)
This resembles ruby's self.
Definition: vm_eval.c:344
VALUE rb_eval_string(const char *str)
Evaluates the given string in an isolated binding.
Definition: vm_eval.c:1835
VALUE rb_call_super(int argc, const VALUE *argv)
This resembles ruby's super.
Definition: vm_eval.c:338
void rb_gc_register_address(VALUE *valptr)
Inform the garbage collector that valptr points to a live Ruby object that should not be moved.
Definition: gc.c:8969
void rb_gc_unregister_address(VALUE *valptr)
Inform the garbage collector that a pointer previously passed to rb_gc_register_address() no longer p...
Definition: gc.c:8981
void rb_global_variable(VALUE *)
An alias for rb_gc_register_address().
Definition: gc.c:9004
void rb_gc_register_mark_object(VALUE object)
Inform the garbage collector that object is a live Ruby object that should not be moved.
Definition: gc.c:8948
VALUE rb_ary_rotate(VALUE ary, long rot)
Destructively rotates the passed array in-place to towards its end.
Definition: array.c:3251
VALUE rb_ary_new_from_values(long n, const VALUE *elts)
Identical to rb_ary_new_from_args(), except how objects are passed.
Definition: array.c:840
VALUE rb_ary_cmp(VALUE lhs, VALUE rhs)
Recursively compares each elements of the two arrays one-by-one using <=>.
Definition: array.c:5438
VALUE rb_ary_rassoc(VALUE alist, VALUE key)
Identical to rb_ary_assoc(), except it scans the passed array from the opposite direction.
Definition: array.c:5187
VALUE rb_ary_concat(VALUE lhs, VALUE rhs)
Destructively appends the contents of latter into the end of former.
Definition: array.c:5074
VALUE rb_ary_assoc(VALUE alist, VALUE key)
Looks up the passed key, assuming the passed array is an alist.
Definition: array.c:5157
VALUE rb_ary_reverse(VALUE ary)
Destructively reverses the passed array in-place.
Definition: array.c:3164
VALUE rb_ary_shared_with_p(VALUE lhs, VALUE rhs)
Queries if the passed two arrays share the same backend storage.
Definition: array.c:719
VALUE rb_ary_shift(VALUE ary)
Destructively deletes an element from the beginning of the passed array and returns what was deleted.
Definition: array.c:1526
VALUE rb_ary_sort(VALUE ary)
Creates a copy of the passed array, whose elements are sorted according to their <=> result.
Definition: array.c:3602
VALUE rb_ary_resurrect(VALUE ary)
I guess there is no use case of this function in extension libraries, but this is a routine identical...
Definition: array.c:2833
VALUE rb_ary_dup(VALUE ary)
Duplicates an array.
Definition: array.c:2820
VALUE rb_ary_includes(VALUE ary, VALUE elem)
Queries if the passed array has the passed entry.
Definition: array.c:5357
VALUE rb_ary_aref(int argc, const VALUE *argv, VALUE ary)
Queries element(s) of an array.
Definition: array.c:1903
VALUE rb_get_values_at(VALUE obj, long olen, int argc, const VALUE *argv, VALUE(*func)(VALUE obj, long oidx))
This was a generalisation of Array#values_at, Struct#values_at, and MatchData#values_at.
void rb_ary_free(VALUE ary)
Destroys the given array for no reason.
Definition: array.c:935
VALUE rb_ary_each(VALUE ary)
Iteratively yields each element of the passed array to the implicitly passed block if any.
Definition: array.c:2660
VALUE rb_ary_delete_at(VALUE ary, long pos)
Destructively removes an element which resides at the specific index of the passed array.
Definition: array.c:4160
VALUE rb_ary_unshift(VALUE ary, VALUE elem)
Destructively prepends the passed item at the beginning of the passed array.
Definition: array.c:1744
VALUE rb_ary_plus(VALUE lhs, VALUE rhs)
Creates a new array, concatenating the former to the latter.
Definition: array.c:5014
VALUE rb_ary_cat(VALUE ary, const VALUE *train, long len)
Destructively appends multiple elements at the end of the array.
Definition: array.c:1422
void rb_ary_modify(VALUE ary)
Declares that the array is about to be modified.
Definition: array.c:637
VALUE rb_ary_replace(VALUE copy, VALUE orig)
Replaces the contents of the former object with the contents of the latter.
Definition: array.c:4664
VALUE rb_check_array_type(VALUE obj)
Try converting an object to its array representation using its to_ary method, if any.
Definition: array.c:1061
VALUE rb_ary_to_ary(VALUE obj)
Force converts an object to an array.
Definition: array.c:2252
VALUE rb_ary_new(void)
Allocates a new, empty array.
Definition: array.c:801
VALUE rb_ary_new_capa(long capa)
Identical to rb_ary_new(), except it additionally specifies how many rooms of objects it should alloc...
Definition: array.c:795
VALUE rb_ary_resize(VALUE ary, long len)
Expands or shrinks the passed array to the passed length.
Definition: array.c:2346
VALUE rb_ary_pop(VALUE ary)
Destructively deletes an element from the end of the passed array and returns what was deleted.
Definition: array.c:1460
VALUE rb_ary_tmp_new(long capa)
Allocates a "temporary" array.
Definition: array.c:917
VALUE rb_ary_clear(VALUE ary)
Destructively removes everything form an array.
Definition: array.c:4720
VALUE rb_ary_subseq(VALUE ary, long beg, long len)
Obtains a part of the passed array.
Definition: array.c:1790
VALUE rb_ary_push(VALUE ary, VALUE elem)
Special case of rb_ary_cat() that it adds only one element.
Definition: array.c:1409
VALUE rb_ary_freeze(VALUE obj)
Just another name of rb_obj_freeze.
Definition: array.c:706
VALUE rb_ary_to_s(VALUE ary)
Converts an array into a human-readable string.
Definition: array.c:3054
VALUE rb_ary_new_from_args(long n,...)
Constructs an array from the passed objects.
Definition: array.c:807
VALUE rb_ary_entry(VALUE ary, long off)
Queries an element of an array.
Definition: array.c:1762
VALUE rb_ary_sort_bang(VALUE ary)
Destructively sorts the passed array in-place, according to each elements' <=> result.
Definition: array.c:3499
VALUE rb_assoc_new(VALUE car, VALUE cdr)
Identical to rb_ary_new_from_values(), except it expects exactly two parameters.
Definition: array.c:1048
void rb_mem_clear(VALUE *buf, long len)
Fills the memory region with a series of RUBY_Qnil.
Definition: array.c:289
VALUE rb_ary_delete(VALUE ary, VALUE elem)
Destructively removes elements from the passed array, so that there would be no elements inside that ...
Definition: array.c:4106
VALUE rb_ary_join(VALUE ary, VALUE sep)
Recursively stringises the elements of the passed array, flattens that result, then joins the sequenc...
Definition: array.c:2934
void rb_ary_store(VALUE ary, long key, VALUE val)
Destructively stores the passed value to the passed array's passed index.
Definition: array.c:1245
int rb_integer_pack(VALUE val, void *words, size_t numwords, size_t wordsize, size_t nails, int flags)
Exports an integer into a buffer.
Definition: bignum.c:3577
VALUE rb_big_lshift(VALUE x, VALUE y)
Performs shift left.
Definition: bignum.c:6636
VALUE rb_big_and(VALUE x, VALUE y)
Performs bitwise and of the passed two objects.
Definition: bignum.c:6375
VALUE rb_big_or(VALUE x, VALUE y)
Performs bitwise or of the passed two objects.
Definition: bignum.c:6494
VALUE rb_big_minus(VALUE x, VALUE y)
Performs subtraction of the passed two objects.
Definition: bignum.c:5868
VALUE rb_big_modulo(VALUE x, VALUE y)
Performs modulo of the passed two objects.
Definition: bignum.c:6118
VALUE rb_big_new(size_t len, int sign)
Allocates a bignum object.
Definition: bignum.c:3043
VALUE rb_big_pow(VALUE x, VALUE y)
Raises x to the powerof y.
Definition: bignum.c:6259
int rb_bigzero_p(VALUE x)
Queries if the passed bignum instance is a "bigzro".
Definition: bignum.c:2947
VALUE rb_big_plus(VALUE x, VALUE y)
Performs addition of the passed two objects.
Definition: bignum.c:5839
VALUE rb_str_to_inum(VALUE str, int base, int badcheck)
Identical to rb_cstr2inum(), except it takes Ruby's strings instead of C's.
Definition: bignum.c:4298
VALUE rb_big_clone(VALUE num)
Duplicates the given bignum.
Definition: bignum.c:3049
size_t rb_absint_size(VALUE val, int *nlz_bits_ret)
Calculates the number of bytes needed to represent the absolute value of the passed integer.
Definition: bignum.c:3276
size_t rb_absint_numwords(VALUE val, size_t word_numbits, size_t *nlz_bits_ret)
Calculates the number of words needed represent the absolute value of the passed integer.
Definition: bignum.c:3411
int rb_absint_singlebit_p(VALUE val)
Tests abs(val) consists only of a bit or not.
Definition: bignum.c:3476
VALUE rb_integer_unpack(const void *words, size_t numwords, size_t wordsize, size_t nails, int flags)
Import an integer from a buffer.
Definition: bignum.c:3663
unsigned long rb_big2ulong(VALUE x)
Converts a bignum into C's unsigned long.
Definition: bignum.c:5148
VALUE rb_big_idiv(VALUE x, VALUE y)
Performs "integer division".
Definition: bignum.c:6112
void rb_big_2comp(VALUE num)
Destructively modify the passed bignum into 2's complement representation.
Definition: bignum.c:3078
VALUE rb_big2str(VALUE x, int base)
Generates a place-value representation of the passed integer.
Definition: bignum.c:5114
VALUE rb_big_cmp(VALUE lhs, VALUE rhs)
Compares the passed two bignums.
Definition: bignum.c:5436
VALUE rb_str2inum(VALUE str, int base)
Identical to rb_str_to_inum(), except the second argument controls the base and badcheck at once.
Definition: bignum.c:4574
VALUE rb_dbl2big(double d)
Converts a C's double into a bignum.
Definition: bignum.c:5272
VALUE rb_big_mul(VALUE x, VALUE y)
Performs multiplication of the passed two objects.
Definition: bignum.c:5948
VALUE rb_big_eql(VALUE lhs, VALUE rhs)
Equality, in terms of eql?.
Definition: bignum.c:5560
VALUE rb_cstr2inum(const char *str, int base)
Identical to rb_cstr_to_inum(), except the second argument controls the base and badcheck at once.
Definition: bignum.c:4568
int rb_uv_to_utf8(char buf[6], unsigned long uv)
Encodes a Unicode codepoint into its UTF-8 representation.
Definition: pack.c:1637
VALUE rb_big_unpack(unsigned long *buf, long num_longs)
Constructs a (possibly very big) bignum from a series of integers.
Definition: bignum.c:3252
VALUE rb_big_divmod(VALUE x, VALUE y)
Performs "divmod" operation.
Definition: bignum.c:6150
VALUE rb_big_xor(VALUE x, VALUE y)
Performs exclusive or of the passed two objects.
Definition: bignum.c:6588
VALUE rb_big_div(VALUE x, VALUE y)
Performs division of the passed two objects.
Definition: bignum.c:6106
VALUE rb_big_norm(VALUE x)
Normalises the passed bignum.
Definition: bignum.c:3181
VALUE rb_cstr_to_inum(const char *str, int base, int badcheck)
Parses C's string to convert into a Ruby's integer.
Definition: bignum.c:4040
void rb_big_pack(VALUE val, unsigned long *buf, long num_longs)
Converts a bignum into a series of its parts.
Definition: bignum.c:3244
VALUE rb_big_rshift(VALUE x, VALUE y)
Performs shift right.
Definition: bignum.c:6666
double rb_big2dbl(VALUE x)
Converts a bignum into C's double.
Definition: bignum.c:5333
long rb_big2long(VALUE x)
Converts a bignum into C's long.
Definition: bignum.c:5163
void rb_big_resize(VALUE big, size_t len)
Destructively resizes the backend storage of the passed bignum.
Definition: bignum.c:3017
VALUE rb_big_eq(VALUE lhs, VALUE rhs)
Equality, in terms of ==.
Definition: bignum.c:5541
void rb_undef(VALUE mod, ID mid)
Inserts a method entry that hides previous method definition of the given name.
Definition: vm_method.c:1751
int rb_cmpint(VALUE val, VALUE a, VALUE b)
Canonicalises the passed val, which is the return value of a <=> b, into C's {-1, 0,...
Definition: bignum.c:2953
void rb_cmperr(VALUE a, VALUE b)
Raises "comparison failed" error.
Definition: compar.c:28
VALUE rb_complex_uminus(VALUE z)
Performs negation of the passed object.
Definition: complex.c:759
VALUE rb_complex_div(VALUE x, VALUE y)
Performs division of the passed two objects.
Definition: complex.c:949
VALUE rb_complex_new(VALUE real, VALUE imag)
Constructs a Complex, by first multiplying the imaginary part with 1i then adds it to the real part.
Definition: complex.c:1529
VALUE rb_complex_plus(VALUE x, VALUE y)
Performs addition of the passed two objects.
Definition: complex.c:779
VALUE rb_complex_new_polar(VALUE abs, VALUE arg)
Constructs a Complex using polar representations.
Definition: complex.c:1535
VALUE rb_complex_arg(VALUE z)
Queries the argument (or the angle) of the passed object.
Definition: complex.c:1209
VALUE rb_complex_raw(VALUE real, VALUE imag)
Identical to rb_complex_new(), except it assumes both arguments are not instances of rb_cComplex.
Definition: complex.c:1523
VALUE rb_dbl_complex_new(double real, double imag)
Identical to rb_complex_new(), except it takes the arguments as C's double instead of Ruby's object.
Definition: complex.c:1556
VALUE rb_complex_abs(VALUE z)
Queries the absolute (or the magnitude) of the passed object.
Definition: complex.c:1162
VALUE rb_complex_real(VALUE z)
Queries the real part of the passed Complex.
Definition: complex.c:727
VALUE rb_complex_mul(VALUE x, VALUE y)
Performs multiplication of the passed two objects.
Definition: complex.c:873
VALUE rb_complex_conjugate(VALUE z)
Performs complex conjugation of the passed object.
Definition: complex.c:1255
VALUE rb_Complex(VALUE real, VALUE imag)
Converts various values into a Complex.
Definition: complex.c:1547
VALUE rb_complex_minus(VALUE x, VALUE y)
Performs subtraction of the passed two objects.
Definition: complex.c:813
VALUE rb_complex_pow(VALUE base, VALUE exp)
Performs exponentiation of the passed two objects.
Definition: complex.c:986
VALUE rb_complex_imag(VALUE z)
Queries the imaginary part of the passed Complex.
Definition: complex.c:744
VALUE rb_fiber_current(void)
Queries the fiber which is calling this function.
Definition: cont.c:2254
VALUE rb_fiber_alive_p(VALUE fiber)
Queries the liveness of the passed fiber.
Definition: cont.c:2531
VALUE rb_fiber_new(rb_block_call_func_t func, VALUE callback_obj)
Creates a Fiber instance from a C-backended block.
Definition: cont.c:1969
VALUE rb_obj_is_fiber(VALUE obj)
Queries if an object is a fiber.
Definition: cont.c:1135
VALUE rb_fiber_yield(int argc, const VALUE *argv)
Yields the control back to the point where the current fiber was resumed.
Definition: cont.c:2509
VALUE rb_fiber_resume(VALUE fiber, int argc, const VALUE *argv)
Resumes the execution of the passed fiber, either from the point at which the last rb_fiber_yield() w...
Definition: cont.c:2497
VALUE rb_dir_getwd(void)
Queries the path of the current working directory of the current process.
Definition: dir.c:1124
VALUE rb_enum_values_pack(int argc, const VALUE *argv)
Basically identical to rb_ary_new_form_values(), except it returns something different when argc < 2.
Definition: enum.c:53
VALUE rb_enumeratorize_with_size(VALUE recv, VALUE meth, int argc, const VALUE *argv, rb_enumerator_size_func *func)
Identical to rb_enumeratorize(), except you can additionally specify the size function of return valu...
Definition: enumerator.c:536
VALUE rb_enumeratorize(VALUE recv, VALUE meth, int argc, const VALUE *argv)
Constructs an enumerator.
Definition: enumerator.c:511
int rb_arithmetic_sequence_extract(VALUE as, rb_arithmetic_sequence_components_t *buf)
Extracts components of the passed arithmetic sequence.
Definition: enumerator.c:3429
VALUE rb_enumerator_size_func(VALUE recv, VALUE argv, VALUE eobj)
This is the type of functions that rb_enumeratorize_with_size() expects.
Definition: enumerator.h:45
static int rb_check_arity(int argc, int min, int max)
Ensures that the passed integer is in the passed range.
Definition: error.h:280
ID rb_frame_callee(void)
Identical to rb_frame_this_func(), except it returns the named used to call the method.
Definition: eval.c:1042
ID rb_frame_this_func(void)
Queries the name of the Ruby level method that is calling this function.
Definition: eval.c:1036
void rb_obj_call_init(VALUE obj, int argc, const VALUE *argv)
Calls initialize method of the passed object with the passed arguments.
Definition: eval.c:1663
VALUE rb_f_abort(int argc, const VALUE *argv)
This is similar to rb_f_exit().
Definition: process.c:4581
void rb_interrupt(void)
Raises an instance of rb_eInterrupt.
Definition: eval.c:690
VALUE rb_f_exit(int argc, const VALUE *argv)
Identical to rb_exit(), except how arguments are passed.
Definition: process.c:4516
VALUE rb_make_exception(int argc, const VALUE *argv)
Constructs an exception object from the list of arguments, in a manner similar to Ruby's raise.
Definition: eval.c:818
void rb_jump_tag(int state)
This function is to re-throw global escapes.
Definition: eval.c:842
void rb_set_end_proc(void(*func)(VALUE arg), VALUE arg)
Registers a function that shall run on process exit.
VALUE rb_find_file(VALUE path)
Identical to rb_find_file_ext(), except it takes a feature name and is extension at once,...
Definition: file.c:6467
VALUE rb_file_s_absolute_path(int argc, const VALUE *argv)
Identical to rb_file_absolute_path(), except how arguments are passed.
Definition: file.c:4141
VALUE rb_str_encode_ospath(VALUE path)
Converts a string into an "OS Path" encoding, if any.
Definition: file.c:251
int rb_is_absolute_path(const char *path)
Queries if the given path is an absolute path.
Definition: file.c:6232
int rb_find_file_ext(VALUE *feature, const char *const *exts)
Resolves a feature's path.
Definition: file.c:6408
VALUE rb_file_s_expand_path(int argc, const VALUE *argv)
Identical to rb_file_expand_path(), except how arguments are passed.
Definition: file.c:4093
VALUE rb_file_directory_p(VALUE _, VALUE path)
Queries if the given path is either a directory, or a symlink that (potentially recursively) points t...
Definition: file.c:1609
VALUE rb_file_expand_path(VALUE fname, VALUE dname)
Identical to rb_file_absolute_path(), except it additionally understands ~.
Definition: file.c:4080
VALUE rb_file_dirname(VALUE fname)
Strips a file path's last component (and trailing separators if any).
Definition: file.c:4747
VALUE rb_file_absolute_path(VALUE fname, VALUE dname)
Maps a relative path to its absolute representation.
Definition: file.c:4134
void rb_gc_mark(VALUE obj)
Marks an object.
Definition: gc.c:6900
void rb_memerror(void)
Triggers out-of-memory error.
Definition: gc.c:11610
size_t rb_gc_stat(VALUE key_or_buf)
Obtains various GC related profiles.
Definition: gc.c:10986
VALUE rb_gc_disable(void)
Disables GC.
Definition: gc.c:11189
VALUE rb_gc_start(void)
Identical to rb_gc(), except the return value.
Definition: gc.c:10620
VALUE rb_gc_latest_gc_info(VALUE key_or_buf)
Obtains various info regarding the most recent GC run.
Definition: gc.c:10764
void rb_mark_tbl(struct st_table *tbl)
Identical to rb_mark_hash(), except it marks only values of the table and leave their associated keys...
Definition: gc.c:6681
VALUE rb_gc_enable(void)
(Re-) enables GC.
Definition: gc.c:11152
void rb_mark_hash(struct st_table *tbl)
Marks keys and values associated inside of the given table.
Definition: gc.c:6486
VALUE rb_undefine_finalizer(VALUE obj)
Modifies the object so that it has no finalisers at all.
Definition: gc.c:4049
int rb_during_gc(void)
Queries if the GC is busy.
Definition: gc.c:10635
void rb_gc_mark_maybe(VALUE obj)
Identical to rb_gc_mark(), except it allows the passed value be a non-object.
Definition: gc.c:6719
void rb_gc_mark_locations(const VALUE *start, const VALUE *end)
Marks objects between the two pointers.
Definition: gc.c:6316
void rb_gc(void)
Triggers a GC process.
Definition: gc.c:10627
void rb_gc_force_recycle(VALUE obj)
Asserts that the passed object is no longer needed.
Definition: gc.c:8938
void rb_mark_set(struct st_table *tbl)
Identical to rb_mark_hash(), except it marks only keys of the table and leave their associated values...
Definition: gc.c:6422
VALUE rb_define_finalizer(VALUE obj, VALUE block)
Assigns a finaliser for an object.
Definition: gc.c:4201
void rb_gc_copy_finalizer(VALUE dst, VALUE src)
Copy&paste an object's finaliser to another.
Definition: gc.c:4209
void rb_gc_adjust_memory_usage(ssize_t diff)
Informs that there are external memory usages.
Definition: gc.c:12381
size_t rb_gc_count(void)
Identical to rb_gc_stat(), with "count" parameter.
Definition: gc.c:10659
VALUE rb_hash_size(VALUE hash)
Identical to RHASH_SIZE(), except it returns the size in Ruby's integer instead of C's.
Definition: hash.c:2980
void rb_hash_bulk_insert(long argc, const VALUE *argv, VALUE hash)
Inserts a list of key-value pairs into a hash table at once.
Definition: hash.c:4758
void rb_hash_foreach(VALUE hash, int(*func)(VALUE key, VALUE val, VALUE arg), VALUE arg)
Iterates over a hash.
VALUE rb_check_hash_type(VALUE obj)
Try converting an object to its hash representation using its to_hash method, if any.
Definition: hash.c:1902
VALUE rb_hash_lookup2(VALUE hash, VALUE key, VALUE def)
Identical to rb_hash_lookup(), except you can specify what to return on misshits.
Definition: hash.c:2101
int rb_path_check(const char *path)
This function is mysterious.
Definition: file.c:6309
VALUE rb_hash_freeze(VALUE obj)
Just another name of rb_obj_freeze.
Definition: hash.c:87
VALUE rb_hash_update_func(VALUE newkey, VALUE oldkey, VALUE value)
Type of callback functions to pass to rb_hash_update_by().
Definition: hash.h:269
#define st_foreach_safe
Just another name of rb_st_foreach_safe.
Definition: hash.h:51
VALUE rb_hash_delete(VALUE hash, VALUE key)
Deletes the passed key from the passed hash table, if any.
Definition: hash.c:2368
VALUE rb_hash_fetch(VALUE hash, VALUE key)
Identical to rb_hash_lookup(), except it yields the (implicitly) passed block instead of returning RU...
Definition: hash.c:2179
VALUE rb_hash_delete_if(VALUE hash)
Deletes each entry for which the block returns a truthy value.
Definition: hash.c:2530
VALUE rb_hash_update_by(VALUE hash1, VALUE hash2, rb_hash_update_func *func)
Destructively merges two hash tables into one.
Definition: hash.c:4015
VALUE rb_hash_aref(VALUE hash, VALUE key)
Queries the given key in the given hash table.
Definition: hash.c:2088
VALUE rb_hash_aset(VALUE hash, VALUE key, VALUE val)
Inserts or replaces ("upsert"s) the objects into the given hash table.
Definition: hash.c:2908
VALUE rb_env_clear(void)
Destructively removes every environment variables of the running process.
Definition: hash.c:5886
VALUE rb_hash_lookup(VALUE hash, VALUE key)
Identical to rb_hash_aref(), except it always returns RUBY_Qnil for misshits.
Definition: hash.c:2114
VALUE rb_hash_dup(VALUE hash)
Duplicates a hash.
Definition: hash.c:1591
VALUE rb_hash(VALUE obj)
Calculates a message authentication code of the passed object.
Definition: hash.c:227
VALUE rb_hash_clear(VALUE hash)
Swipes everything out of the passed hash table.
Definition: hash.c:2834
VALUE rb_hash_new(void)
Creates a new, empty hash object.
Definition: hash.c:1529
VALUE rb_io_printf(int argc, const VALUE *argv, VALUE io)
This is a rb_f_sprintf() + rb_io_write() combo.
Definition: io.c:8246
VALUE rb_io_gets(VALUE io)
Reads a "line" from the given IO.
Definition: io.c:3998
int rb_cloexec_pipe(int fildes[2])
Opens a pipe with closing on exec.
Definition: io.c:414
VALUE rb_rs
The record separator character for inputs, or the $/.
Definition: io.c:203
VALUE rb_io_print(int argc, const VALUE *argv, VALUE io)
Iterates over the passed array to apply rb_io_write() individually.
Definition: io.c:8371
VALUE rb_io_addstr(VALUE io, VALUE str)
Identical to rb_io_write(), except it always returns the passed IO.
Definition: io.c:2135
void rb_write_error(const char *str)
Writes the given error message to somewhere applicable.
Definition: io.c:8787
VALUE rb_io_ungetbyte(VALUE io, VALUE b)
Identical to rb_io_ungetc(), except it doesn't take the encoding of the passed IO into account.
Definition: io.c:4855
VALUE rb_io_getbyte(VALUE io)
Reads a byte from the given IO.
Definition: io.c:4763
VALUE rb_io_puts(int argc, const VALUE *argv, VALUE io)
Iterates over the passed array to apply rb_io_write() individually.
Definition: io.c:8601
int rb_cloexec_dup2(int oldfd, int newfd)
Identical to rb_cloexec_dup(), except you can specify the destination file descriptor.
Definition: io.c:361
VALUE rb_io_fdopen(int fd, int flags, const char *path)
Creates an IO instance whose backend is the given file descriptor.
Definition: io.c:8894
void rb_update_max_fd(int fd)
Informs the interpreter that the passed fd can be the max.
Definition: io.c:235
VALUE rb_io_write(VALUE io, VALUE str)
Writes the given string to the given IO.
Definition: io.c:2087
int rb_cloexec_open(const char *pathname, int flags, mode_t mode)
Opens a file that closes on exec.
Definition: io.c:315
VALUE rb_fs
The field separator character for inputs, or the $;.
Definition: string.c:552
VALUE rb_output_rs
The record separator character for outputs, or the $\.
Definition: io.c:204
VALUE rb_io_eof(VALUE io)
Queries if the passed IO is at the end of file.
Definition: io.c:2486
void rb_write_error2(const char *str, long len)
Identical to rb_write_error(), except it additionally takes the message's length.
Definition: io.c:8767
void rb_close_before_exec(int lowfd, int maxhint, VALUE noclose_fds)
Closes everything.
int rb_reserved_fd_p(int fd)
Queries if the given FD is reserved or not.
void rb_fd_fix_cloexec(int fd)
Sets or clears the close-on-exec flag of the passed file descriptor to the desired state.
Definition: io.c:285
VALUE rb_io_flush(VALUE io)
Flushes any buffered data within the passed IO to the underlying operating system.
Definition: io.c:2191
VALUE rb_io_ascii8bit_binmode(VALUE io)
Forces no conversions be applied to the passed IO.
Definition: io.c:5984
VALUE rb_io_binmode(VALUE io)
Sets the binmode.
Definition: io.c:5938
VALUE rb_io_ungetc(VALUE io, VALUE c)
"Unget"s a string.
Definition: io.c:4918
int rb_pipe(int *pipes)
This is an rb_cloexec_pipe() + rb_update_max_fd() combo.
Definition: io.c:6989
VALUE rb_gets(void)
Much like rb_io_gets(), but it reads from the mysterious ARGF object.
Definition: io.c:9724
int rb_cloexec_fcntl_dupfd(int fd, int minfd)
Duplicates a file descriptor with closing on exec.
Definition: io.c:448
VALUE rb_output_fs
The field separator character for outputs, or the $,.
Definition: io.c:202
VALUE rb_file_open_str(VALUE fname, const char *fmode)
Identical to rb_file_open(), except it takes the pathname as a Ruby's string instead of C's.
Definition: io.c:6872
int rb_cloexec_dup(int oldfd)
Identical to rb_cloexec_fcntl_dupfd(), except it implies minfd is 3.
Definition: io.c:354
VALUE rb_file_open(const char *fname, const char *fmode)
Opens a file located at the given path.
Definition: io.c:6879
VALUE rb_io_close(VALUE io)
Closes the IO.
Definition: io.c:5439
VALUE rb_default_rs
This is the default value of rb_rs, i.e.
Definition: io.c:205
void rb_provide(const char *feature)
Declares that the given feature is already provided by someone else.
Definition: load.c:671
VALUE rb_f_require(VALUE self, VALUE feature)
Identical to rb_require_string(), except it ignores the first argument for no reason.
Definition: load.c:939
int rb_feature_provided(const char *feature, const char **loading)
Identical to rb_provided(), except it additionally returns the "canonical" name of the loaded feature...
Definition: load.c:643
void rb_load_protect(VALUE path, int wrap, int *state)
Identical to rb_load(), except it avoids potential global escapes.
Definition: load.c:768
int rb_provided(const char *feature)
Queries if the given feature has already been loaded into the execution context.
Definition: load.c:610
void rb_load(VALUE path, int wrap)
Loads and executes the Ruby program in the given file.
Definition: load.c:760
void rb_num_zerodiv(void)
Just always raises an exception.
Definition: numeric.c:200
VALUE rb_num2fix(VALUE val)
Converts a numeric value into a Fixnum.
Definition: numeric.c:3382
VALUE rb_fix2str(VALUE val, int base)
Generates a place-value representation of the given Fixnum, with given radix.
Definition: numeric.c:3853
VALUE rb_int_positive_pow(long x, unsigned long y)
Raises the passed x to the power of y.
Definition: numeric.c:4492
VALUE rb_dbl_cmp(double lhs, double rhs)
Compares two doubles.
Definition: numeric.c:1661
VALUE rb_num_coerce_bit(VALUE lhs, VALUE rhs, ID op)
This one is optimised for bitwise operations, but the API is identical to rb_num_coerce_bin().
Definition: numeric.c:4923
VALUE rb_num_coerce_relop(VALUE lhs, VALUE rhs, ID op)
Identical to rb_num_coerce_cmp(), except for return values.
Definition: numeric.c:493
VALUE rb_num_coerce_cmp(VALUE lhs, VALUE rhs, ID op)
Identical to rb_num_coerce_bin(), except for return values.
Definition: numeric.c:478
VALUE rb_num_coerce_bin(VALUE lhs, VALUE rhs, ID op)
Coerced binary operation.
Definition: numeric.c:471
VALUE rb_obj_id(VALUE obj)
Finds or creates an integer primary key of the given object.
Definition: gc.c:4712
VALUE rb_backref_get(void)
Queries the last match, or Regexp.last_match, or the $~.
Definition: vm.c:1583
VALUE rb_sym_all_symbols(void)
Collects every single bits of symbols that have ever interned in the entire history of the current pr...
Definition: symbol.c:1002
int rb_is_global_id(ID id)
Classifies the given ID, then sees if it is a global variable.
Definition: symbol.c:1035
void rb_lastline_set(VALUE str)
Updates $_.
Definition: vm.c:1601
int rb_is_instance_id(ID id)
Classifies the given ID, then sees if it is an instance variable.
Definition: symbol.c:1041
int rb_is_const_id(ID id)
Classifies the given ID, then sees if it is a constant.
Definition: symbol.c:1023
int rb_is_junk_id(ID)
Classifies the given ID, then sees if it is a junk ID.
Definition: symbol.c:1059
int rb_symname_p(const char *str)
Sees if the passed C string constructs a valid syntactic symbol.
Definition: symbol.c:197
VALUE rb_lastline_get(void)
Queries the last line, or the $_.
Definition: vm.c:1595
ID rb_id_attrset(ID id)
Calculates an ID of attribute writer.
Definition: symbol.c:113
int rb_is_class_id(ID id)
Classifies the given ID, then sees if it is a class variable.
Definition: symbol.c:1029
int rb_is_attrset_id(ID id)
Classifies the given ID, then sees if it is an attribute writer.
Definition: symbol.c:1047
int rb_is_local_id(ID id)
Classifies the given ID, then sees if it is a local variable.
Definition: symbol.c:1053
void rb_backref_set(VALUE md)
Updates $~.
Definition: vm.c:1589
VALUE rb_method_call_with_block(int argc, const VALUE *argv, VALUE recv, VALUE proc)
Identical to rb_proc_call(), except you can additionally pass a proc as a block.
Definition: proc.c:2491
int rb_obj_method_arity(VALUE obj, ID mid)
Identical to rb_mod_method_arity(), except it searches for singleton methods rather than instance met...
Definition: proc.c:2857
VALUE rb_proc_call(VALUE recv, VALUE args)
Evaluates the passed proc with the passed arguments.
Definition: proc.c:1000
VALUE rb_obj_method(VALUE recv, VALUE mid)
Creates a method object.
Definition: proc.c:2040
VALUE rb_proc_lambda_p(VALUE recv)
Queries if the given object is a lambda.
Definition: proc.c:290
VALUE rb_block_proc(void)
Constructs a Proc object from implicitly passed components.
Definition: proc.c:845
VALUE rb_proc_call_with_block(VALUE recv, int argc, const VALUE *argv, VALUE proc)
Identical to rb_proc_call(), except you can additionally pass another proc object,...
Definition: proc.c:1024
VALUE rb_protect(VALUE(*func)(VALUE args), VALUE args, int *state)
Protects a function call from potential global escapes from the function.
int rb_mod_method_arity(VALUE mod, ID mid)
Queries the number of mandatory arguments of the method defined in the given module.
Definition: proc.c:2849
VALUE rb_proc_new(rb_block_call_func_t func, VALUE callback_arg)
This is an rb_iterate() + rb_block_proc() combo.
Definition: proc.c:3285
VALUE rb_obj_is_method(VALUE recv)
Queries if the given object is a method.
Definition: proc.c:1632
VALUE rb_block_lambda(void)
Identical to rb_proc_new(), except it returns a lambda.
Definition: proc.c:864
VALUE rb_binding_new(void)
Snapshots the current execution context and turn it into an instance of rb_cBinding.
Definition: proc.c:382
int rb_proc_arity(VALUE recv)
Queries the number of mandatory arguments of the given Proc.
Definition: proc.c:1131
VALUE rb_method_call(int argc, const VALUE *argv, VALUE recv)
Evaluates the passed method with the passed arguments.
Definition: proc.c:2455
VALUE rb_obj_is_proc(VALUE recv)
Queries if the given object is a proc.
Definition: proc.c:172
int rb_proc_exec(const char *cmd)
Executes a shell command.
Definition: process.c:1906
VALUE rb_proc_times(VALUE _)
Gathers info about resources consumed by the current process.
VALUE rb_last_status_get(void)
Queries the "last status", or the $?.
Definition: process.c:616
rb_pid_t rb_waitpid(rb_pid_t pid, int *status, int flags)
Waits for a process, with releasing GVL.
Definition: process.c:1458
rb_pid_t rb_spawn_err(int argc, const VALUE *argv, char *errbuf, size_t buflen)
Identical to rb_spawn(), except you can additionally know the detailed situation in case of abnormal ...
Definition: process.c:4757
void rb_syswait(rb_pid_t pid)
This is a shorthand of rb_waitpid without status and flags.
Definition: process.c:4626
VALUE rb_f_exec(int argc, const VALUE *argv)
Replaces the current process by running the given external command.
Definition: process.c:3123
rb_pid_t rb_spawn(int argc, const VALUE *argv)
Identical to rb_f_exec(), except it spawns a child process instead of replacing the current one.
Definition: process.c:4763
void rb_last_status_set(int status, rb_pid_t pid)
Sets the "last status", or the $?.
Definition: process.c:680
VALUE rb_detach_process(rb_pid_t pid)
"Detaches" a subprocess.
Definition: process.c:1661
unsigned long rb_genrand_ulong_limited(unsigned long i)
Generates a random number whose upper limit is i.
Definition: random.c:1044
double rb_random_real(VALUE rnd)
Identical to rb_genrand_real(), except it generates using the passed RNG.
Definition: random.c:1116
unsigned int rb_random_int32(VALUE rnd)
Identical to rb_genrand_int32(), except it generates using the passed RNG.
Definition: random.c:1073
void rb_reset_random_seed(void)
Resets the RNG behind rb_genrand_int32()/rb_genrand_real().
Definition: random.c:1755
VALUE rb_random_bytes(VALUE rnd, long n)
Generates a String of random bytes.
Definition: random.c:1274
double rb_genrand_real(void)
Generates a double random number.
Definition: random.c:199
unsigned long rb_random_ulong_limited(VALUE rnd, unsigned long limit)
Identical to rb_genrand_ulong_limited(), except it generates using the passed RNG.
Definition: random.c:1176
unsigned int rb_genrand_int32(void)
Generates a 32 bit random number.
Definition: random.c:192
int rb_range_values(VALUE range, VALUE *begp, VALUE *endp, int *exclp)
Deconstructs a range into its components.
Definition: range.c:1490
VALUE rb_range_new(VALUE beg, VALUE end, int excl)
Creates a new Range.
Definition: range.c:67
VALUE rb_range_beg_len(VALUE range, long *begp, long *lenp, long len, int err)
Deconstructs a numerical range.
Definition: range.c:1578
VALUE rb_rational_raw(VALUE num, VALUE den)
Identical to rb_rational_new(), except it skips argument validations.
Definition: rational.c:1955
VALUE rb_rational_new(VALUE num, VALUE den)
Constructs a Rational, with reduction.
Definition: rational.c:1969
VALUE rb_Rational(VALUE num, VALUE den)
Converts various values into a Rational.
Definition: rational.c:1975
VALUE rb_rational_num(VALUE rat)
Queries the numerator of the passed Rational.
Definition: rational.c:1984
VALUE rb_flt_rationalize(VALUE flt)
Identical to rb_flt_rationalize_with_prec(), except it auto-detects appropriate precision depending o...
Definition: rational.c:2254
VALUE rb_flt_rationalize_with_prec(VALUE flt, VALUE prec)
Simplified approximation of a float.
Definition: rational.c:2238
VALUE rb_rational_den(VALUE rat)
Queries the denominator of the passed Rational.
Definition: rational.c:1990
int rb_reg_backref_number(VALUE match, VALUE backref)
Queries the index of the given named capture.
Definition: re.c:1224
int rb_reg_options(VALUE re)
Queries the options of the passed regular expression.
Definition: re.c:3855
VALUE rb_reg_last_match(VALUE md)
This just returns the argument, stringified.
Definition: re.c:1876
VALUE rb_reg_match(VALUE re, VALUE str)
This is the match operator.
Definition: re.c:3418
void rb_match_busy(VALUE md)
Asserts that the given MatchData is "occupied".
Definition: re.c:1430
VALUE rb_reg_nth_match(int n, VALUE md)
Queries the nth captured substring.
Definition: re.c:1851
VALUE rb_reg_match_post(VALUE md)
The portion of the original string after the given match.
Definition: re.c:1933
VALUE rb_reg_nth_defined(int n, VALUE md)
Identical to rb_reg_nth_match(), except it just returns Boolean.
Definition: re.c:1834
VALUE rb_reg_match_pre(VALUE md)
The portion of the original string before the given match.
Definition: re.c:1900
VALUE rb_reg_new_str(VALUE src, int opts)
Identical to rb_reg_new(), except it takes the expression in Ruby's string instead of C's.
Definition: re.c:3119
VALUE rb_reg_match_last(VALUE md)
The portion of the original string that captured at the very last.
Definition: re.c:1950
VALUE rb_reg_match2(VALUE re)
Identical to rb_reg_match(), except it matches against rb_lastline_get() (or, the $_).
Definition: re.c:3473
VALUE rb_reg_new(const char *src, long len, int opts)
Creates a new Regular expression.
Definition: re.c:3173
int rb_memcicmp(const void *s1, const void *s2, long n)
Identical to st_locale_insensitive_strcasecmp(), except it is timing safe and returns something diffe...
Definition: re.c:90
void ruby_default_signal(int sig)
Pretends as if there was no custom signal handler.
Definition: signal.c:407
const char * ruby_signal_name(int signo)
Queries the name of the signal.
Definition: signal.c:316
VALUE rb_f_kill(int argc, const VALUE *argv)
Sends a signal ("kills") to processes.
Definition: signal.c:423
void rb_str_free(VALUE str)
Destroys the given string for no reason.
Definition: string.c:1532
#define rb_hash_uint(h, i)
Just another name of st_hash_uint.
Definition: string.h:942
VALUE rb_str_new_shared(VALUE str)
Identical to rb_str_new_cstr(), except it takes a Ruby's string instead of C's.
Definition: string.c:1335
VALUE rb_str_plus(VALUE lhs, VALUE rhs)
Generates a new string, concatenating the former to the latter.
Definition: string.c:2171
#define rb_hash_end(h)
Just another name of st_hash_end.
Definition: string.h:945
#define rb_hash_uint32(h, i)
Just another name of st_hash_uint32.
Definition: string.h:939
VALUE rb_utf8_str_new(const char *ptr, long len)
Identical to rb_str_new(), except it generates a string of "UTF-8" encoding.
Definition: string.c:931
VALUE rb_str_append(VALUE dst, VALUE src)
Identical to rb_str_buf_append(), except it converts the right hand side before concatenating.
Definition: string.c:3259
VALUE rb_filesystem_str_new(const char *ptr, long len)
Identical to rb_str_new(), except it generates a string of "filesystem" encoding.
Definition: string.c:1248
VALUE rb_utf8_str_new_cstr(const char *ptr)
Identical to rb_str_new_cstr(), except it generates a string of "UTF-8" encoding.
Definition: string.c:971
VALUE rb_sym_to_s(VALUE sym)
This is an rb_sym2str() + rb_str_dup() combo.
Definition: string.c:11426
VALUE rb_str_times(VALUE str, VALUE num)
Repetition of a string.
Definition: string.c:2243
VALUE rb_external_str_new(const char *ptr, long len)
Identical to rb_str_new(), except it generates a string of "default external" encoding.
Definition: string.c:1224
VALUE rb_str_tmp_new(long len)
Allocates a "temporary" string.
Definition: string.c:1526
long rb_str_offset(VALUE str, long pos)
"Inverse" of rb_str_sublen().
Definition: string.c:2702
VALUE rb_str_succ(VALUE orig)
Searches for the "successor" of a string.
Definition: string.c:4714
int rb_str_hash_cmp(VALUE str1, VALUE str2)
Compares two strings.
Definition: string.c:3468
VALUE rb_str_subseq(VALUE str, long beg, long len)
Identical to rb_str_substr(), except the numbers are interpreted as byte offsets instead of character...
Definition: string.c:2760
VALUE rb_str_ellipsize(VALUE str, long len)
Shortens str and adds three dots, an ellipsis, if it is longer than len characters.
Definition: string.c:10719
st_index_t rb_memhash(const void *ptr, long len)
This is a universal hash function.
Definition: random.c:1720
void rb_str_shared_replace(VALUE dst, VALUE src)
Replaces the contents of the former with the latter.
Definition: string.c:1579
VALUE rb_str_new_static(const char *ptr, long len)
Identical to rb_str_new(), except it takes a C string literal.
Definition: string.c:1015
VALUE rb_str_buf_cat(VALUE, const char *, long)
Just another name of rb_str_cat.
size_t rb_str_capacity(VALUE str)
Queries the capacity of the given string.
Definition: string.c:827
VALUE rb_str_new_frozen(VALUE str)
Creates a frozen copy of the string, if necessary.
Definition: string.c:1341
VALUE rb_str_cat2(VALUE, const char *)
Just another name of rb_str_cat_cstr.
VALUE rb_str_dup(VALUE str)
Duplicates a string.
Definition: string.c:1794
void rb_str_modify(VALUE str)
Declares that the string is about to be modified.
Definition: string.c:2398
st_index_t rb_str_hash(VALUE str)
Calculates a hash value of a string.
Definition: string.c:3458
VALUE rb_str_cat(VALUE dst, const char *src, long srclen)
Destructively appends the passed contents to the string.
Definition: string.c:3102
VALUE rb_str_locktmp(VALUE str)
Obtains a "temporary lock" of the string.
long rb_str_strlen(VALUE str)
Counts the number of characters (not bytes) that are stored inside of the given string.
Definition: string.c:2109
VALUE rb_str_resurrect(VALUE str)
I guess there is no use case of this function in extension libraries, but this is a routine identical...
Definition: string.c:1800
VALUE rb_usascii_str_new(const char *ptr, long len)
Identical to rb_str_new(), except it generates a string of "US ASCII" encoding.
Definition: string.c:923
VALUE rb_str_replace(VALUE dst, VALUE src)
Replaces the contents of the former object with the stringised contents of the latter.
Definition: string.c:5917
VALUE rb_usascii_str_new_cstr(const char *ptr)
Identical to rb_str_new_cstr(), except it generates a string of "US ASCII" encoding.
Definition: string.c:963
VALUE rb_str_buf_cat2(VALUE, const char *)
Just another name of rb_str_cat_cstr.
char * rb_str_subpos(VALUE str, long beg, long *len)
Identical to rb_str_substr(), except it returns a C's string instead of Ruby's.
Definition: string.c:2783
rb_gvar_setter_t rb_str_setter
This is a rb_gvar_setter_t that refutes non-string assignments.
Definition: string.h:1146
VALUE rb_filesystem_str_new_cstr(const char *ptr)
Identical to rb_filesystem_str_new(), except it assumes the passed pointer is a pointer to a C string...
Definition: string.c:1254
VALUE rb_str_buf_append(VALUE dst, VALUE src)
Identical to rb_str_cat_cstr(), except it takes Ruby's string instead of C's.
Definition: string.c:3244
long rb_str_sublen(VALUE str, long pos)
Byte offset to character offset conversion.
Definition: string.c:2749
VALUE rb_str_equal(VALUE str1, VALUE str2)
Equality of two strings.
Definition: string.c:3570
void rb_str_set_len(VALUE str, long len)
Overwrites the length of the string.
Definition: string.c:2980
st_index_t rb_hash_start(st_index_t i)
Starts a series of hashing.
Definition: random.c:1714
VALUE rb_str_inspect(VALUE str)
Generates a "readable" version of the receiver.
Definition: string.c:6602
void rb_must_asciicompat(VALUE obj)
Asserts that the given string's encoding is (Ruby's definition of) ASCII compatible.
Definition: string.c:2450
VALUE rb_str_buf_new_cstr(const char *ptr)
This is a rb_str_buf_new() + rb_str_buf_cat() combo.
Definition: string.c:1514
int rb_str_cmp(VALUE lhs, VALUE rhs)
Compares two strings, as in strcmp(3).
Definition: string.c:3524
VALUE rb_str_concat(VALUE dst, VALUE src)
Identical to rb_str_append(), except it also accepts an integer as a codepoint.
Definition: string.c:3360
int rb_str_comparable(VALUE str1, VALUE str2)
Checks if two strings are comparable each other or not.
Definition: string.c:3499
VALUE rb_str_buf_cat_ascii(VALUE dst, const char *src)
Identical to rb_str_cat_cstr(), except it additionally assumes the source string be a NUL terminated ...
Definition: string.c:3220
VALUE rb_str_freeze(VALUE str)
This is the implementation of String#freeze.
Definition: string.c:2902
void rb_str_update(VALUE dst, long beg, long len, VALUE src)
Replaces some (or all) of the contents of the given string.
Definition: string.c:5218
VALUE rb_str_new(const char *ptr, long len)
Allocates an instance of rb_cString.
Definition: string.c:917
VALUE rb_str_scrub(VALUE str, VALUE repl)
"Cleanses" the string.
Definition: string.c:10777
VALUE rb_str_dup_frozen(VALUE)
Just another name of rb_str_new_frozen.
VALUE rb_str_new_with_class(VALUE obj, const char *ptr, long len)
Identical to rb_str_new(), except it takes the class of the allocating object.
Definition: string.c:1473
VALUE rb_locale_str_new_cstr(const char *ptr)
Identical to rb_locale_str_new(), except it assumes the passed pointer is a pointer to a C string.
Definition: string.c:1242
VALUE rb_check_string_type(VALUE obj)
Try converting an object to its stringised representation using its to_str method,...
Definition: string.c:2598
VALUE rb_str_substr(VALUE str, long beg, long len)
This is the implementation of two-argumented String#slice.
Definition: string.c:2870
VALUE rb_str_unlocktmp(VALUE str)
Releases a lock formerly obtained by rb_str_locktmp().
Definition: string.c:2963
VALUE rb_str_new_cstr(const char *ptr)
Identical to rb_str_new(), except it assumes the passed pointer is a pointer to a C string.
Definition: string.c:951
VALUE rb_str_resize(VALUE str, long len)
Overwrites the length of the string.
Definition: string.c:2997
VALUE rb_utf8_str_new_static(const char *ptr, long len)
Identical to rb_str_new_static(), except it generates a string of "UTF-8" encoding instead of "binary...
Definition: string.c:1027
void rb_str_modify_expand(VALUE str, long capa)
Identical to rb_str_modify(), except it additionally expands the capacity of the receiver.
Definition: string.c:2406
VALUE rb_str_dump(VALUE str)
"Inverse" of rb_eval_string().
Definition: string.c:6713
VALUE rb_locale_str_new(const char *ptr, long len)
Identical to rb_str_new(), except it generates a string of "locale" encoding.
Definition: string.c:1236
VALUE rb_str_buf_new(long capa)
Allocates a "string buffer".
Definition: string.c:1492
VALUE rb_external_str_new_cstr(const char *ptr)
Identical to rb_external_str_new(), except it assumes the passed pointer is a pointer to a C string.
Definition: string.c:1230
VALUE rb_str_length(VALUE)
Identical to rb_str_strlen(), except it returns the value in rb_cInteger.
Definition: string.c:2123
VALUE rb_str_cat_cstr(VALUE dst, const char *src)
Identical to rb_str_cat(), except it assumes the passed pointer is a pointer to a C string.
Definition: string.c:3112
VALUE rb_str_drop_bytes(VALUE str, long len)
Shrinks the given string for the given number of bytes.
Definition: string.c:5144
VALUE rb_str_split(VALUE str, const char *delim)
Divides the given string based on the given delimiter.
Definition: string.c:8781
VALUE rb_usascii_str_new_static(const char *ptr, long len)
Identical to rb_str_new_static(), except it generates a string of "US ASCII" encoding instead of "bin...
Definition: string.c:1021
VALUE rb_str_intern(VALUE str)
Identical to rb_to_symbol(), except it assumes the receiver being an instance of RString.
Definition: symbol.c:837
VALUE rb_obj_as_string(VALUE obj)
Try converting an object to its stringised representation using its to_s method, if any.
Definition: string.c:1643
VALUE rb_struct_define_without_accessor_under(VALUE outer, const char *class_name, VALUE super, rb_alloc_func_t alloc,...)
Identical to rb_struct_define_without_accessor(), except it defines the class under the specified nam...
Definition: struct.c:410
VALUE rb_struct_define_under(VALUE space, const char *name,...)
Identical to rb_struct_define(), except it defines the class under the specified namespace instead of...
Definition: struct.c:451
VALUE rb_struct_new(VALUE klass,...)
Creates an instance of the given struct.
Definition: struct.c:805
VALUE rb_struct_initialize(VALUE self, VALUE values)
Mass-assigns a struct's fields.
Definition: struct.c:732
VALUE rb_struct_define_without_accessor(const char *name, VALUE super, rb_alloc_func_t func,...)
Identical to rb_struct_define(), except it does not define accessor methods.
Definition: struct.c:423
VALUE rb_struct_define(const char *name,...)
Defines a struct class.
Definition: struct.c:436
VALUE rb_struct_alloc(VALUE klass, VALUE values)
Identical to rb_struct_new(), except it takes the field values as a Ruby array.
Definition: struct.c:799
VALUE rb_struct_alloc_noinit(VALUE klass)
Allocates an instance of the given class.
Definition: struct.c:353
VALUE rb_struct_s_members(VALUE klass)
Queries the list of the names of the fields of the given struct class.
Definition: struct.c:64
VALUE rb_struct_members(VALUE self)
Queries the list of the names of the fields of the class of the given struct object.
Definition: struct.c:78
VALUE rb_struct_getmember(VALUE self, ID key)
Identical to rb_struct_aref(), except it takes ID instead of VALUE.
Definition: struct.c:229
int rb_thread_interrupted(VALUE thval)
Checks if the thread's execution was recently interrupted.
Definition: thread.c:1399
VALUE rb_thread_local_aref(VALUE thread, ID key)
This badly named function reads from a Fiber local storage.
Definition: thread.c:3314
VALUE rb_mutex_new(void)
Creates a mutex.
Definition: thread_sync.c:172
int rb_thread_fd_writable(int fd)
Identical to rb_thread_wait_fd(), except it blocks the current thread until the given file descriptor...
Definition: io.c:1397
VALUE rb_thread_kill(VALUE thread)
Terminates the given thread.
Definition: thread.c:2507
VALUE rb_thread_main(void)
Obtains the "main" thread.
Definition: thread.c:2746
VALUE rb_exec_recursive(VALUE(*f)(VALUE g, VALUE h, int r), VALUE g, VALUE h)
"Recursion" API entry point.
void rb_thread_sleep_forever(void)
Blocks indefinitely.
Definition: thread.c:1328
void rb_thread_fd_close(int fd)
Notifies a closing of a file descriptor to other threads.
Definition: thread.c:2447
void rb_thread_wait_for(struct timeval time)
Identical to rb_thread_sleep(), except it takes struct timeval instead.
Definition: thread.c:1367
VALUE rb_mutex_trylock(VALUE mutex)
Attempts to lock the mutex, without waiting for other threads to unlock it.
Definition: thread_sync.c:233
VALUE rb_mutex_locked_p(VALUE mutex)
Queries if there are any threads that holds the lock.
Definition: thread_sync.c:184
VALUE rb_mutex_synchronize(VALUE mutex, VALUE(*func)(VALUE arg), VALUE arg)
Obtains the lock, runs the passed function, and releases the lock when it completes.
Definition: thread_sync.c:597
VALUE rb_thread_stop(void)
Stops the current thread.
Definition: thread.c:2658
VALUE rb_mutex_sleep(VALUE self, VALUE timeout)
Releases the lock held in the mutex and waits for the period of time; reacquires the lock on wakeup.
Definition: thread_sync.c:530
VALUE rb_exec_recursive_paired(VALUE(*f)(VALUE g, VALUE h, int r), VALUE g, VALUE p, VALUE h)
Identical to rb_exec_recursive(), except it checks for the recursion on the ordered pair of { g,...
void rb_unblock_function_t(void *)
This is the type of UBFs.
Definition: thread.h:337
void rb_thread_atfork_before_exec(void)
:FIXME: situation of this function is unclear.
Definition: thread.c:4620
VALUE rb_thread_create(VALUE(*f)(void *g), void *g)
Creates a Ruby thread that is backended by a C function.
void rb_thread_check_ints(void)
Checks for interrupts.
Definition: thread.c:1382
VALUE rb_thread_run(VALUE thread)
This is a rb_thread_wakeup() + rb_thread_schedule() combo.
Definition: thread.c:2649
VALUE rb_thread_wakeup(VALUE thread)
Marks a given thread as eligible for scheduling.
Definition: thread.c:2602
VALUE rb_mutex_unlock(VALUE mutex)
Releases the mutex.
Definition: thread_sync.c:468
VALUE rb_exec_recursive_paired_outer(VALUE(*f)(VALUE g, VALUE h, int r), VALUE g, VALUE p, VALUE h)
Identical to rb_exec_recursive_outer(), except it checks for the recursion on the ordered pair of { g...
void rb_thread_sleep_deadly(void)
Identical to rb_thread_sleep_forever(), except the thread calling this function is considered "dead" ...
Definition: thread.c:1335
void rb_thread_atfork(void)
A pthread_atfork(3posix)-like API.
Definition: thread.c:4615
VALUE rb_thread_current(void)
Obtains the "current" thread.
Definition: thread.c:2725
int rb_thread_alone(void)
Checks if the thread this function is running is the only thread that is currently alive.
Definition: thread.c:3586
int rb_thread_wait_fd(int fd)
Blocks the current thread until the given file descriptor is ready to be read.
Definition: io.c:1391
VALUE rb_thread_local_aset(VALUE thread, ID key, VALUE val)
This badly named function writes to a Fiber local storage.
Definition: thread.c:3462
void rb_thread_schedule(void)
Tries to switch to another thread.
Definition: thread.c:1430
VALUE rb_thread_wakeup_alive(VALUE thread)
Identical to rb_thread_wakeup(), except it doesn't raise on an already killed thread.
Definition: thread.c:2611
VALUE rb_mutex_lock(VALUE mutex)
Attempts to lock the mutex.
Definition: thread_sync.c:395
void rb_thread_sleep(int sec)
Blocks for the given period of time.
Definition: thread.c:1405
VALUE rb_time_nano_new(time_t sec, long nsec)
Identical to rb_time_new(), except it accepts the time in nanoseconds resolution.
Definition: time.c:2482
void rb_timespec_now(struct timespec *ts)
Fills the current time into the given struct.
Definition: time.c:1896
VALUE rb_time_timespec_new(const struct timespec *ts, int offset)
Creates an instance of rb_cTime, with given time and offset.
Definition: time.c:2488
struct timespec rb_time_timespec(VALUE time)
Identical to rb_time_timeval(), except for return type.
Definition: time.c:2651
VALUE rb_time_new(time_t sec, long usec)
Creates an instance of rb_cTime with the given time and the local timezone.
Definition: time.c:2474
struct timeval rb_time_timeval(VALUE time)
Converts an instance of rb_cTime to a struct timeval that represents the identical point of time.
Definition: time.c:2634
struct timeval rb_time_interval(VALUE num)
Creates a "time interval".
Definition: time.c:2628
VALUE rb_time_num_new(VALUE timev, VALUE off)
Identical to rb_time_timespec_new(), except it takes Ruby values instead of C structs.
Definition: time.c:2511
VALUE rb_time_utc_offset(VALUE time)
Queries the offset, in seconds between the time zone of the time and the UTC.
Definition: time.c:4694
VALUE rb_mod_remove_cvar(VALUE mod, VALUE name)
Resembles Module#remove_class_variable.
Definition: variable.c:3859
VALUE rb_obj_instance_variables(VALUE obj)
Resembles Object#instance_variables.
Definition: variable.c:1903
VALUE rb_f_untrace_var(int argc, const VALUE *argv)
Deletes the passed tracer from the passed global variable, or if omitted, deletes everything.
Definition: variable.c:674
VALUE rb_const_get(VALUE space, ID name)
Identical to rb_const_defined(), except it returns the actual defined value.
Definition: variable.c:2850
VALUE rb_const_list(void *)
This is another mysterious API that comes with no documents at all.
Definition: variable.c:3070
VALUE rb_path2class(const char *path)
Resolves a Q::W::E::R-style path string to the actual class it points.
Definition: variable.c:305
VALUE rb_autoload_p(VALUE space, ID name)
Queries if an autoload is defined at a point.
Definition: variable.c:2723
VALUE rb_attr_get(VALUE obj, ID name)
Identical to rb_ivar_get()
Definition: variable.c:1310
void rb_set_class_path(VALUE klass, VALUE space, const char *name)
Names a class.
Definition: variable.c:252
VALUE rb_ivar_set(VALUE obj, ID name, VALUE val)
Identical to rb_iv_set(), except it accepts the name as an ID instead of a C string.
Definition: variable.c:1592
VALUE rb_mod_remove_const(VALUE space, VALUE name)
Resembles Module#remove_const.
Definition: variable.c:2942
VALUE rb_class_path_cached(VALUE mod)
Just another name of rb_mod_name.
Definition: variable.c:198
VALUE rb_f_trace_var(int argc, const VALUE *argv)
Traces a global variable.
Definition: variable.c:628
void rb_cvar_set(VALUE klass, ID name, VALUE val)
Assigns a value to a class variable.
Definition: variable.c:3624
VALUE rb_cvar_get(VALUE klass, ID name)
Obtains a value from a class variable.
Definition: variable.c:3693
VALUE rb_mod_constants(int argc, const VALUE *argv, VALUE recv)
Resembles Module#constants.
Definition: variable.c:3102
VALUE rb_path_to_class(VALUE path)
Identical to rb_path2class(), except it accepts the path as Ruby's string instead of C's.
Definition: variable.c:260
VALUE rb_ivar_get(VALUE obj, ID name)
Identical to rb_iv_get(), except it accepts the name as an ID instead of a C string.
Definition: variable.c:1302
void rb_ivar_foreach(VALUE obj, int(*func)(ID name, VALUE val, st_data_t arg), st_data_t arg)
Iterates over an object's instance variables.
void rb_const_set(VALUE space, ID name, VALUE val)
Names a constant.
Definition: variable.c:3303
VALUE rb_autoload_load(VALUE space, ID name)
Kicks the autoload procedure as if it was "touched".
Definition: variable.c:2685
VALUE rb_mod_name(VALUE mod)
Queries the name of a module.
Definition: variable.c:138
VALUE rb_class_name(VALUE obj)
Queries the name of the given object's class.
Definition: variable.c:311
VALUE rb_const_get_at(VALUE space, ID name)
Identical to rb_const_defined_at(), except it returns the actual defined value.
Definition: variable.c:2856
void rb_set_class_path_string(VALUE klass, VALUE space, VALUE name)
Identical to rb_set_class_path(), except it accepts the name as Ruby's string instead of C's.
Definition: variable.c:232
void rb_alias_variable(ID dst, ID src)
Aliases a global variable.
Definition: variable.c:860
void rb_define_class_variable(VALUE, const char *, VALUE)
Just another name of rb_cv_set.
Definition: variable.c:3733
VALUE rb_obj_remove_instance_variable(VALUE obj, VALUE name)
Resembles Object#remove_instance_variable.
Definition: variable.c:1958
void * rb_mod_const_of(VALUE, void *)
This is a variant of rb_mod_const_at().
Definition: variable.c:3048
st_index_t rb_ivar_count(VALUE obj)
Number of instance variables defined on an object.
Definition: variable.c:1835
void * rb_mod_const_at(VALUE, void *)
This API is mysterious.
Definition: variable.c:3031
VALUE rb_const_remove(VALUE space, ID name)
Identical to rb_mod_remove_const(), except it takes the name as ID instead of VALUE.
Definition: variable.c:2953
VALUE rb_const_get_from(VALUE space, ID name)
Identical to rb_const_defined_at(), except it returns the actual defined value.
Definition: variable.c:2844
VALUE rb_ivar_defined(VALUE obj, ID name)
Queries if the instance variable is defined at the object.
Definition: variable.c:1609
VALUE rb_cv_get(VALUE klass, const char *name)
Identical to rb_cvar_get(), except it accepts C's string instead of ID.
Definition: variable.c:3726
int rb_const_defined_at(VALUE space, ID name)
Identical to rb_const_defined(), except it doesn't look for parent classes.
Definition: variable.c:3164
void rb_cv_set(VALUE klass, const char *name, VALUE val)
Identical to rb_cvar_set(), except it accepts C's string instead of ID.
Definition: variable.c:3719
VALUE rb_mod_class_variables(int argc, const VALUE *argv, VALUE recv)
Resembles Module#class_variables.
Definition: variable.c:3824
VALUE rb_f_global_variables(void)
Queries the list of global variables.
Definition: variable.c:828
VALUE rb_cvar_defined(VALUE klass, ID name)
Queries if the given class has the given class variable.
Definition: variable.c:3700
VALUE rb_class_path(VALUE mod)
Identical to rb_mod_name(), except it returns #<Class: ...> style inspection for anonymous modules.
Definition: variable.c:189
int rb_const_defined_from(VALUE space, ID name)
Identical to rb_const_defined(), except it returns false for private constants.
Definition: variable.c:3152
int rb_const_defined(VALUE space, ID name)
Queries if the constant is defined at the namespace.
Definition: variable.c:3158
void rb_free_generic_ivar(VALUE obj)
Frees the list of instance variables.
Definition: variable.c:1172
int rb_respond_to(VALUE obj, ID mid)
Queries if the object responds to the method.
Definition: vm_method.c:2799
VALUE(* rb_alloc_func_t)(VALUE klass)
This is the type of functions that ruby calls when trying to allocate an object.
Definition: vm.h:216
void rb_undef_alloc_func(VALUE klass)
Deletes the allocator function of a class.
Definition: vm_method.c:1151
const char * rb_sourcefile(void)
Resembles __FILE__.
Definition: vm.c:1609
void rb_alias(VALUE klass, ID dst, ID src)
Resembles alias.
Definition: vm_method.c:2134
int rb_method_basic_definition_p(VALUE klass, ID mid)
Well... Let us hesitate from describing what a "basic definition" is.
Definition: vm_method.c:2677
void rb_attr(VALUE klass, ID name, int need_reader, int need_writer, int honour_visibility)
This function resembles now-deprecated Module#attr.
Definition: vm_method.c:1714
void rb_remove_method(VALUE klass, const char *name)
Removes a method.
Definition: vm_method.c:1563
VALUE rb_check_funcall(VALUE recv, ID mid, int argc, const VALUE *argv)
Identical to rb_funcallv(), except it returns RUBY_Qundef instead of raising rb_eNoMethodError.
Definition: vm_eval.c:664
int rb_frame_method_id_and_class(ID *idp, VALUE *klassp)
Resembles __method__.
Definition: vm.c:2578
rb_alloc_func_t rb_get_alloc_func(VALUE klass)
Queries the allocator function of a class.
Definition: vm_method.c:1157
VALUE rb_mod_module_eval(int argc, const VALUE *argv, VALUE mod)
Identical to rb_obj_instance_eval(), except it evaluates within the context of module.
Definition: vm_eval.c:2138
void rb_remove_method_id(VALUE klass, ID mid)
Identical to rb_remove_method(), except it accepts the method name as ID.
Definition: vm_method.c:1557
VALUE rb_mod_module_exec(int argc, const VALUE *argv, VALUE mod)
Identical to rb_obj_instance_exec(), except it evaluates within the context of module.
Definition: vm_eval.c:2172
void rb_define_alloc_func(VALUE klass, rb_alloc_func_t func)
Sets the allocator function of a class.
VALUE rb_obj_instance_exec(int argc, const VALUE *argv, VALUE recv)
Executes the given block within the context of the receiver.
Definition: vm_eval.c:2099
VALUE rb_f_notimplement(int argc, const VALUE *argv, VALUE obj, VALUE marker)
Raises rb_eNotImpError.
Definition: vm_method.c:360
VALUE rb_apply(VALUE recv, ID mid, VALUE args)
Identical to rb_funcallv(), except it takes Ruby's array instead of C's.
Definition: vm_eval.c:1077
VALUE rb_make_backtrace(void)
Creates the good old fashioned array-of-strings style backtrace info.
int rb_method_boundp(VALUE klass, ID id, int ex)
Queries if the klass has this method.
Definition: vm_method.c:1675
void rb_backtrace(void)
Prints the backtrace out to the standard error.
VALUE rb_obj_instance_eval(int argc, const VALUE *argv, VALUE recv)
Evaluates a string containing Ruby source code, or the given block, within the context of the receive...
Definition: vm_eval.c:2069
int rb_sourceline(void)
Resembles __LINE__.
Definition: vm.c:1623
int rb_obj_respond_to(VALUE obj, ID mid, int private_p)
Identical to rb_respond_to(), except it additionally takes the visibility parameter.
Definition: vm_method.c:2783
ID rb_intern2(const char *name, long len)
Identical to rb_intern(), except it additionally takes the length of the string.
Definition: symbol.c:775
VALUE rb_check_symbol(volatile VALUE *namep)
Identical to rb_check_id(), except it returns an instance of rb_cSymbol instead.
Definition: symbol.c:1110
VALUE rb_id2sym(ID id)
Allocates an instance of rb_cSymbol that has the given id.
Definition: symbol.c:916
ID rb_check_id(volatile VALUE *namep)
Detects if the given name is already interned or not.
Definition: symbol.c:1077
ID rb_intern(const char *name)
Finds or creates a symbol of the given name.
Definition: symbol.c:782
VALUE rb_sym2str(VALUE id)
Identical to rb_id2str(), except it takes an instance of rb_cSymbol rather than an ID.
Definition: symbol.c:935
VALUE rb_to_symbol(VALUE name)
Identical to rb_intern_str(), except it generates a dynamic symbol if necessary.
Definition: string.c:11770
ID rb_sym2id(VALUE obj)
Converts an instance of rb_cSymbol into an ID.
Definition: symbol.c:882
ID rb_to_id(VALUE str)
Identical to rb_intern(), except it takes an instance of rb_cString.
Definition: string.c:11760
const char * rb_id2name(ID id)
Retrieves the name mapped to the given id.
Definition: symbol.c:952
ID rb_intern_str(VALUE str)
Identical to rb_intern(), except it takes an instance of rb_cString.
Definition: symbol.c:788
VALUE rb_id2str(ID id)
Identical to rb_id2name(), except it returns a Ruby's String instead of C's.
Definition: symbol.c:946
rb_gvar_setter_t rb_gvar_var_setter
Definition: variable.h:119
rb_gvar_marker_t rb_gvar_var_marker
Definition: variable.h:128
void rb_define_global_const(const char *name, VALUE val)
Identical to rb_define_const(), except it defines that of "global", i.e.
Definition: variable.c:3409
VALUE rb_gv_get(const char *name)
Obtains a global variable.
Definition: variable.c:786
void rb_define_variable(const char *name, VALUE *var)
"Shares" a global variable between Ruby and C.
Definition: variable.c:599
void rb_gvar_marker_t(VALUE *var)
Type that represents a global variable marker function.
Definition: variable.h:53
void rb_deprecate_constant(VALUE mod, const char *name)
Asserts that the given constant is deprecated.
Definition: variable.c:3457
void rb_gvar_setter_t(VALUE val, ID id, VALUE *data)
Type that represents a global variable setter function.
Definition: variable.h:46
rb_gvar_setter_t rb_gvar_val_setter
This is the setter function that backs global variables defined from a ruby script.
Definition: variable.h:94
rb_gvar_marker_t rb_gvar_undef_marker
Definition: variable.h:80
void rb_define_readonly_variable(const char *name, const VALUE *var)
Identical to rb_define_variable(), except it does not allow Ruby programs to assign values to such gl...
Definition: variable.c:605
rb_gvar_setter_t rb_gvar_readonly_setter
This function just raises rb_eNameError.
Definition: variable.h:135
rb_gvar_getter_t rb_gvar_undef_getter
Definition: variable.h:62
VALUE rb_gv_set(const char *name, VALUE val)
Assigns to a global variable.
Definition: variable.c:772
rb_gvar_marker_t rb_gvar_val_marker
This is the setter function that backs global variables defined from a ruby script.
Definition: variable.h:101
void rb_define_virtual_variable(const char *name, rb_gvar_getter_t *getter, rb_gvar_setter_t *setter)
Defines a global variable that is purely function-backended.
Definition: variable.c:611
void rb_define_const(VALUE klass, const char *name, VALUE val)
Defines a Ruby level constant under a namespace.
Definition: variable.c:3397
VALUE rb_gvar_getter_t(ID id, VALUE *data)
Type that represents a global variable getter function.
Definition: variable.h:37
VALUE rb_iv_get(VALUE obj, const char *name)
Obtains an instance variable.
Definition: variable.c:3881
rb_gvar_setter_t rb_gvar_undef_setter
Definition: variable.h:71
rb_gvar_getter_t rb_gvar_val_getter
This is the getter function that backs global variables defined from a ruby script.
Definition: variable.h:87
VALUE rb_iv_set(VALUE obj, const char *name, VALUE val)
Assigns to an instance variable.
Definition: variable.c:3892
void rb_define_hooked_variable(const char *name, VALUE *var, rb_gvar_getter_t *getter, rb_gvar_setter_t *setter)
Identical to rb_define_virtual_variable(), but can also specify a storage.
Definition: variable.c:580
rb_gvar_getter_t rb_gvar_var_getter
Definition: variable.h:110
VALUE rb_io_get_io(VALUE io)
Identical to rb_io_check_io(), except it raises exceptions on conversion failures.
Definition: io.c:802
const signed char ruby_digit36_to_number_table[]
Character to number mapping like ‘'a’->10,'b'->11` etc.
Definition: util.c:76
#define strtod(s, e)
Just another name of ruby_strtod.
Definition: util.h:212
const char ruby_hexdigits[]
Characters that Ruby accepts as hexadecimal digits.
Definition: util.c:34
unsigned long ruby_scan_digits(const char *str, ssize_t len, int base, size_t *retlen, int *overflow)
Scans the passed string, assuming the string is a textual representation of an integer.
Definition: util.c:98
#define strdup(s)
Just another name of ruby_strdup.
Definition: util.h:176
const int ruby_api_version[3]
API versions, in { major, minor, teeny } order.
Definition: version.c:27
void ruby_vm_at_exit(void(*func)(ruby_vm_t *))
ruby_vm_at_exit registers a function func to be invoked when a VM passed away.
Definition: vm.c:699
int ruby_vm_destruct(ruby_vm_t *vm)
Destructs the passed VM.
Definition: vm.c:2778
unsigned long rb_num2uint(VALUE num)
Converts an instance of rb_cNumeric into C's unsigned long.
Definition: numeric.c:3296
long rb_fix2int(VALUE num)
Identical to rb_num2int().
Definition: numeric.c:3290
static int rb_num2int_inline(VALUE x)
Converts an instance of rb_cNumeric into C's int.
Definition: int.h:158
long rb_num2int(VALUE num)
Converts an instance of rb_cNumeric into C's long.
Definition: numeric.c:3284
unsigned long rb_fix2uint(VALUE num)
Identical to rb_num2uint().
Definition: numeric.c:3302
VALUE rb_str_format(int argc, const VALUE *argv, VALUE fmt)
Formats a string.
Definition: sprintf.c:214
VALUE rb_f_sprintf(int argc, const VALUE *argv)
Identical to rb_str_format(), except how the arguments are arranged.
Definition: sprintf.c:208
VALUE rb_sprintf(const char *fmt,...)
Ruby's extended sprintf(3).
Definition: sprintf.c:1201
VALUE rb_str_vcatf(VALUE dst, const char *fmt, va_list ap)
Identical to rb_str_catf(), except it takes a va_list.
Definition: sprintf.c:1214
VALUE rb_vsprintf(const char *fmt, va_list ap)
Identical to rb_sprintf(), except it takes a va_list.
Definition: sprintf.c:1195
VALUE rb_str_catf(VALUE dst, const char *fmt,...)
Identical to rb_sprintf(), except it renders the output to the specified object rather than creating ...
Definition: sprintf.c:1241
LONG_LONG rb_num2ll(VALUE num)
Converts an instance of rb_cNumeric into C's long long.
unsigned LONG_LONG rb_num2ull(VALUE num)
Converts an instance of rb_cNumeric into C's unsigned long long.
VALUE rb_ull2inum(unsigned LONG_LONG num)
Converts a C's unsigned long long into an instance of rb_cInteger.
VALUE rb_ll2inum(LONG_LONG num)
Converts a C's long long into an instance of rb_cInteger.
static LONG_LONG rb_num2ll_inline(VALUE x)
Converts an instance of rb_cNumeric into C's long long.
Definition: long_long.h:110
VALUE rb_int2inum(intptr_t i)
Converts a C's intptr_t into an instance of rb_cInteger.
Definition: bignum.c:3237
VALUE rb_uint2big(uintptr_t i)
Converts a C's intptr_t into an instance of rb_cInteger.
Definition: bignum.c:3187
VALUE rb_int2big(intptr_t i)
Converts a C's intptr_t into an instance of rb_cInteger.
Definition: bignum.c:3209
VALUE rb_uint2inum(uintptr_t i)
Converts a C's uintptr_t into an instance of rb_cInteger.
Definition: bignum.c:3230
VALUE rb_catch_obj(VALUE tag, rb_block_call_func_t func, VALUE data)
Identical to rb_catch(), except it catches arbitrary Ruby objects.
Definition: vm_eval.c:2401
VALUE rb_each(VALUE obj)
This is a shorthand of calling obj.each.
Definition: vm_eval.c:1657
VALUE rb_block_call(VALUE obj, ID mid, int argc, const VALUE *argv, rb_block_call_func_t proc, VALUE data2)
Identical to rb_funcallv(), except it additionally passes a function as a block.
Definition: vm_eval.c:1595
VALUE rb_yield_values(int n,...)
Identical to rb_yield(), except it takes variadic number of parameters and pass them to the block.
Definition: vm_eval.c:1369
VALUE rb_yield_splat(VALUE ary)
Identical to rb_yield_values(), except it splats an array to generate the list of parameters.
Definition: vm_eval.c:1403
void rb_throw(const char *tag, VALUE val)
Transfers control to the end of the active catch block waiting for tag.
Definition: vm_eval.c:2289
VALUE rb_yield_values2(int n, const VALUE *argv)
Identical to rb_yield_values(), except it takes the parameters as a C array instead of variadic argum...
Definition: vm_eval.c:1391
VALUE rb_yield(VALUE val)
Yields the block.
Definition: vm_eval.c:1357
VALUE rb_yield_block(RB_BLOCK_CALL_FUNC_ARGLIST(yielded_arg, callback_arg))
Pass a passed block.
void rb_throw_obj(VALUE tag, VALUE val)
Identical to rb_throw(), except it allows arbitrary Ruby object to become a tag.
Definition: vm_eval.c:2264
VALUE rb_block_call_func(RB_BLOCK_CALL_FUNC_ARGLIST(yielded_arg, callback_arg))
This is the type of a function that the interpreter expect for C-backended blocks.
Definition: iterator.h:83
VALUE rb_iterate(VALUE(*func1)(VALUE), VALUE data1, rb_block_call_func_t proc, VALUE data2)
Old way to iterate a block.
Definition: vm_eval.c:1569
VALUE rb_catch(const char *tag, rb_block_call_func_t func, VALUE data)
Executes the passed block and catches values thrown from inside of it.
Definition: vm_eval.c:2359
int rb_fd_select(int nfds, rb_fdset_t *rfds, rb_fdset_t *wfds, rb_fdset_t *efds, struct timeval *timeout)
Waits for multiple file descriptors at once.
int rb_fd_isset(int fd, const rb_fdset_t *f)
Queries if the given FD is in the given set.
void rb_fd_clr(int fd, rb_fdset_t *f)
Releases a specific FD from the given fdset.
void rb_fd_copy(rb_fdset_t *dst, const fd_set *src, int max)
Destructively overwrites an fdset with another.
void rb_fd_dup(rb_fdset_t *dst, const rb_fdset_t *src)
Identical to rb_fd_copy(), except it copies unlimited number of file descriptors.
void rb_fd_term(rb_fdset_t *f)
Destroys the rb_fdset_t, releasing any memory and resources it used.
void rb_fd_zero(rb_fdset_t *f)
Wipes out the current set of FDs.
static long rb_num2long_inline(VALUE x)
Converts an instance of rb_cNumeric into C's long.
Definition: long.h:267
static unsigned long rb_num2ulong_inline(VALUE x)
Converts an instance of rb_cNumeric into C's unsigned long.
Definition: long.h:293
static int rb_long2int_inline(long n)
Checks if int can hold the given integer.
Definition: long.h:135
static VALUE rb_ulong2num_inline(unsigned long v)
Converts a C's unsigned long into an instance of rb_cInteger.
Definition: long.h:323
static long rb_fix2long(VALUE x)
Converts a Fixnum into C's long.
Definition: long.h:231
void rb_out_of_int(SIGNED_VALUE num)
This is an utility function to raise an rb_eRangeError.
Definition: numeric.c:3211
long rb_num2long(VALUE num)
Converts an instance of rb_cNumeric into C's long.
Definition: numeric.c:3136
unsigned long rb_num2ulong(VALUE num)
Converts an instance of rb_cNumeric into C's unsigned long.
Definition: numeric.c:3205
static VALUE rb_long2num_inline(long v)
Converts a C's long into an instance of rb_cInteger.
Definition: long.h:308
static unsigned long rb_fix2ulong(VALUE x)
Converts a Fixnum into C's unsigned long.
Definition: long.h:252
VALUE rb_marshal_dump(VALUE obj, VALUE port)
Serialises the given object and all its referring objects, to write them down to the passed port.
Definition: marshal.c:2423
void rb_marshal_define_compat(VALUE newclass, VALUE oldclass, VALUE(*dumper)(VALUE), VALUE(*loader)(VALUE, VALUE))
Marshal format compatibility layer.
Definition: marshal.c:148
VALUE rb_marshal_load(VALUE port)
Deserialises a previous output of rb_marshal_dump() into a network of objects.
Definition: marshal.c:2429
static void * rb_alloc_tmp_buffer2(volatile VALUE *store, long count, size_t elsize)
This is an implementation detail of RB_ALLOCV_N().
Definition: memory.h:640
static int rb_mul_size_overflow(size_t a, size_t b, size_t max, size_t *c)
Definition: memory.h:525
VALUE type(ANYARGS)
ANYARGS-ed function type.
Definition: cxxanyargs.hpp:56
int st_foreach(st_table *q, int_type *w, st_data_t e)
Iteration over the given table.
Definition: cxxanyargs.hpp:432
int st_foreach_check(st_table *q, int_type *w, st_data_t e, st_data_t)
Iteration over the given table.
Definition: cxxanyargs.hpp:450
VALUE rb_newobj(void)
This is the implementation detail of RB_NEWOBJ.
Definition: gc.c:2826
void rb_copy_generic_ivar(VALUE clone, VALUE obj)
Copies the list of instance variables.
Definition: variable.c:1736
VALUE rb_newobj_of(VALUE klass, VALUE flags)
This is the implementation detail of RB_NEWOBJ_OF.
Definition: gc.c:2832
static void rb_clone_setup(VALUE clone, VALUE obj)
Definition: newobj.h:173
static void rb_dup_setup(VALUE dup, VALUE obj)
Definition: newobj.h:190
#define rb_fd_init
Initialises the :given :rb_fdset_t.
Definition: posix.h:63
#define rb_fd_set
Sets the given fd to the rb_fdset_t.
Definition: posix.h:54
fd_set rb_fdset_t
The data structure which wraps the fd_set bitmap used by select(2).
Definition: posix.h:48
void rb_ary_detransient(VALUE a)
Destructively converts an array of transient backend into ordinal one.
Definition: array.c:458
static long rb_array_len(VALUE a)
Queries the length of the array.
Definition: rarray.h:317
@ RARRAY_EMBED_LEN_SHIFT
Where ::RARRAY_EMBED_LEN_MASK resides.
Definition: rarray.h:165
int rb_big_sign(VALUE num)
The "sign" of a bignum.
Definition: bignum.c:6788
#define RCLASS_SUPER
Just another name of rb_class_get_superclass.
Definition: rclass.h:44
VALUE rb_data_object_wrap(VALUE klass, void *datap, RUBY_DATA_FUNC dmark, RUBY_DATA_FUNC dfree)
This is the primitive way to wrap an existing C struct into RData.
Definition: gc.c:2978
static VALUE rb_data_object_alloc(VALUE klass, void *data, RUBY_DATA_FUNC dmark, RUBY_DATA_FUNC dfree)
Definition: rdata.h:367
static VALUE rb_data_object_make(VALUE klass, RUBY_DATA_FUNC mark_func, RUBY_DATA_FUNC free_func, void **datap, size_t size)
This is an implementation detail of Data_Make_Struct.
Definition: rdata.h:358
VALUE rb_data_object_zalloc(VALUE klass, size_t size, RUBY_DATA_FUNC dmark, RUBY_DATA_FUNC dfree)
Identical to rb_data_object_wrap(), except it allocates a new data region internally instead of takin...
Definition: gc.c:2986
void(* RUBY_DATA_FUNC)(void *)
This is the type of callbacks registered to RData.
Definition: rdata.h:108
static VALUE rb_obj_wb_unprotect(VALUE x, const char *filename, int line)
This is the implementation of RB_OBJ_WB_UNPROTECT().
Definition: rgengc.h:363
void rb_gc_writebarrier(VALUE old, VALUE young)
This is the implementation of RB_OBJ_WRITE().
Definition: gc.c:8721
void rb_gc_writebarrier_unprotect(VALUE obj)
This is the implementation of RB_OBJ_WB_UNPROTECT().
Definition: gc.c:8757
VALUE rb_hash_set_ifnone(VALUE hash, VALUE ifnone)
This is the implementation detail of RHASH_SET_IFNONE.
Definition: hash.c:99
struct st_table * rb_hash_tbl(VALUE hash, const char *file, int line)
This is the implementation detail of RHASH_TBL.
Definition: hash.c:1621
size_t rb_hash_size_num(VALUE hash)
This is the implementation detail of RHASH_SIZE.
Definition: hash.c:2986
@ ROBJECT_EMBED_LEN_MAX
Max possible number of instance variables that can be embedded.
Definition: robject.h:84
VALUE rb_str_export_locale(VALUE obj)
Identical to rb_str_export(), except it converts into the locale encoding instead.
Definition: string.c:1266
char * rb_string_value_cstr(volatile VALUE *ptr)
Identical to rb_string_value_ptr(), except it additionally checks for the contents for viability as a...
Definition: string.c:2575
VALUE rb_string_value(volatile VALUE *ptr)
Identical to rb_str_to_str(), except it fills the passed pointer with the converted object.
Definition: string.c:2459
VALUE rb_str_export(VALUE obj)
Identical to rb_str_to_str(), except it additionally converts the string into default external encodi...
Definition: string.c:1260
char * rb_string_value_ptr(volatile VALUE *ptr)
Identical to rb_str_to_str(), except it returns the converted string's backend memory region.
Definition: string.c:2470
VALUE rb_str_to_str(VALUE obj)
Identical to rb_check_string_type(), except it raises exceptions in case of conversion failures.
Definition: string.c:1570
VALUE rb_struct_aset(VALUE st, VALUE k, VALUE v)
Resembles Struct#[]=.
Definition: struct.c:1221
VALUE rb_struct_size(VALUE st)
Returns the number of struct members.
Definition: struct.c:1474
VALUE rb_struct_aref(VALUE st, VALUE k)
Resembles Struct#[].
Definition: struct.c:1183
VALUE rb_data_typed_object_wrap(VALUE klass, void *datap, const rb_data_type_t *type)
This is the primitive way to wrap an existing C struct into RTypedData.
Definition: gc.c:2994
VALUE rb_data_typed_object_zalloc(VALUE klass, size_t size, const rb_data_type_t *type)
Identical to rb_data_typed_object_wrap(), except it allocates a new data region internally instead of...
Definition: gc.c:3002
static VALUE rb_data_typed_object_alloc(VALUE klass, void *datap, const rb_data_type_t *type)
Definition: rtypeddata.h:599
static VALUE rb_data_typed_object_make(VALUE klass, const rb_data_type_t *type, void **datap, size_t size)
While we don't stop you from using this function, it seems to be an implementation detail of TypedDat...
Definition: rtypeddata.h:590
VALUE rb_argv0
The value of $0 at process bootup.
Definition: ruby.c:1566
VALUE rb_get_argv(void)
Queries the arguments passed to the current process that you can access from Ruby as ARGV.
Definition: io.c:13963
void * rb_load_file_str(VALUE file)
Identical to rb_load_file(), except it takes the argument as a Ruby's string instead of C's.
Definition: ruby.c:2410
void * rb_load_file(const char *file)
Loads the given file.
Definition: ruby.c:2403
VALUE rb_get_path(VALUE obj)
Converts an object to a path.
Definition: file.c:245
const char * rb_class2name(VALUE klass)
Queries the name of the passed class.
Definition: variable.c:317
VALUE rb_require(const char *feature)
Identical to rb_require_string(), except it takes C's string instead of Ruby's.
Definition: load.c:1273
const char * rb_obj_classname(VALUE obj)
Queries the name of the class of the passed object.
Definition: variable.c:326
void rb_p(VALUE obj)
Inspects an object.
Definition: io.c:8670
int ruby_vsnprintf(char *str, size_t n, char const *fmt, va_list ap)
Identical to ruby_snprintf(), except it takes a va_list.
Definition: sprintf.c:1008
VALUE rb_get_path_no_checksafe(VALUE)
Definition: file.c:239
int ruby_native_thread_p(void)
Queries if the thread which calls this function is a ruby's thread.
Definition: thread.c:5338
int ruby_snprintf(char *str, size_t n, char const *fmt,...)
Our own locale-insensitive version of snprintf(3).
Definition: sprintf.c:1035
int rb_thread_fd_select(int nfds, rb_fdset_t *rfds, rb_fdset_t *wfds, rb_fdset_t *efds, struct timeval *timeout)
Waits for multiple file descriptors at once.
Definition: thread.c:4118
short rb_num2short(VALUE num)
Converts an instance of rb_cNumeric into C's short.
Definition: numeric.c:3340
unsigned short rb_num2ushort(VALUE num)
Converts an instance of rb_cNumeric into C's unsigned short.
Definition: numeric.c:3358
short rb_fix2short(VALUE num)
Identical to rb_num2short().
Definition: numeric.c:3349
unsigned short rb_fix2ushort(VALUE num)
Identical to rb_num2ushort().
Definition: numeric.c:3368
static short rb_num2short_inline(VALUE x)
Identical to rb_num2short().
Definition: short.h:105
@ RUBY_Qtrue
@ RUBY_SPECIAL_SHIFT
Least significant 8 bits are reserved.
@ RUBY_FIXNUM_FLAG
Flag to denote a fixnum.
@ RUBY_Qnil
@ RUBY_FLONUM_MASK
Bit mask detecting a flonum.
@ RUBY_FLONUM_FLAG
Flag to denote a flonum.
@ RUBY_Qundef
Represents so-called undef.
@ RUBY_SYMBOL_FLAG
Flag to denote a static symbol.
@ RUBY_IMMEDIATE_MASK
Bit mask detecting special consts.
@ RUBY_Qfalse
const VALUE ary[RARRAY_EMBED_LEN_MAX]
Embedded elements.
struct RBasic basic
Basic part, including flags and class.
long capa
Capacity of *ptr.
long len
Number of elements of the array.
const VALUE * ptr
Pointer to the C array that holds the elements of the array.
Ruby's object's, base components.
Definition: rbasic.h:64
const VALUE klass
Class of an object.
Definition: rbasic.h:88
VALUE flags
Per-object flags.
Definition: rbasic.h:77
Internal header for Complex.
RUBY_DATA_FUNC dfree
This function is called when the object is no longer used.
void * data
Pointer to the actual C level struct that you want to wrap.
RUBY_DATA_FUNC dmark
This function is called when the object is experiencing GC marks.
struct RBasic basic
Basic part, including flags and class.
Ruby's File and IO.
struct RBasic basic
Basic part, including flags and class.
struct rb_io_t * fptr
IO's specific fields.
Ruby's ordinal objects.
struct st_table * iv_index_tbl
This is a table that holds instance variable name to index mapping.
struct RBasic basic
Basic part, including flags and class.
VALUE * ivptr
Pointer to a C array that holds instance variables.
uint32_t numiv
Number of instance variables.
VALUE ary[ROBJECT_EMBED_LEN_MAX]
Embedded instance variables.
Internal header for Rational.
Ruby's regular expression.
struct RBasic basic
Basic part, including flags and class.
const VALUE src
Source code of this expression.
struct re_pattern_buffer * ptr
The pattern buffer.
unsigned long usecnt
Reference count.
Ruby's String.
struct RBasic basic
Basic part, including flags and class.
long capa
Capacity of *ptr.
long len
Length of the string, not including terminating NUL character.
VALUE shared
Parent of the string.
char * ptr
Pointer to the contents of the string.
"Typed" user data.
const rb_data_type_t * type
This field stores various information about how Ruby should handle a data.
VALUE typed_flag
This has to be always 1.
void * data
Pointer to the actual C level struct that you want to wrap.
struct RBasic basic
The part that all ruby objects have in common.
comment represents a sequence of comment lines.
Definition: parserstate.h:33
Definition: lex.c:34
Definition: lexer.h:99
Decomposed Enumerator::ArithmeicSequence.
int exclude_end
Whether the endpoint is open or closed.
VALUE end
"Right" or "highest" endpoint of the sequence.
VALUE begin
"Left" or "lowest" endpoint of the sequence.
CREF (Class REFerence)
This is the struct that holds necessary info for a struct.
size_t(* dsize)(const void *)
This function is to query the size of the underlying memory regions.
RUBY_DATA_FUNC dfree
This function is called when the object is no longer used.
void * data
Type-specific static data.
void * reserved[1]
This field is reserved for future extension.
RUBY_DATA_FUNC dmark
This function is called when the object is experiencing GC marks.
const char * wrap_struct_name
Name of structs of this kind.
VALUE flags
Type-specific behavioural characteristics.
const rb_data_type_t * parent
Parent of this class.
The data structure which wraps the fd_set bitmap used by select(2).
int maxfd
Maximum allowed number of FDs.
fd_set * fdset
File descriptors buffer.
Ruby's IO, metadata and buffers.
Definition: io.h:99
const rb_iseq_t *const iseqptr
iseq pointer, should be separated from iseqval
rb_cref_t *const cref
class reference, should be marked
Internal header for Class.
Definition: st.c:133
IFUNC (Internal FUNCtion)
SVAR (Special VARiable)
const VALUE cref_or_me
class reference or rb_method_entry_t
void rb_nativethread_lock_lock(rb_nativethread_lock_t *lock)
Blocks until the current thread obtains a lock.
Definition: thread.c:295
rb_nativethread_id_t rb_nativethread_self(void)
Queries the ID of the native thread that is calling this function.
void rb_nativethread_lock_unlock(rb_nativethread_lock_t *lock)
Releases a lock.
Definition: thread.c:301
void rb_nativethread_lock_initialize(rb_nativethread_lock_t *lock)
Fills the passed lock with an initial value.
Definition: thread.c:283
void rb_nativethread_lock_destroy(rb_nativethread_lock_t *lock)
Destroys the passed mutex.
Definition: thread.c:289
Definition: dtoa.c:302
uintptr_t ID
Type that represents a Ruby identifier such as a variable name.
Definition: value.h:52
uintptr_t VALUE
Type that represents a Ruby object.
Definition: value.h:40
static enum ruby_value_type rb_type(VALUE obj)
Identical to RB_BUILTIN_TYPE(), except it can also accept special constants.
Definition: value_type.h:224
static bool rb_integer_type_p(VALUE obj)
Queries if the object is an instance of rb_cInteger.
Definition: value_type.h:203
@ RUBY_T_SYMBOL
Definition: value_type.h:134
@ RUBY_T_MATCH
Definition: value_type.h:127
@ RUBY_T_MODULE
Definition: value_type.h:117
@ RUBY_T_ICLASS
Hidden classes known as IClasses.
Definition: value_type.h:140
@ RUBY_T_FIXNUM
Integers formerly known as Fixnums.
Definition: value_type.h:135
@ RUBY_T_IMEMO
Definition: value_type.h:138
@ RUBY_T_NODE
Definition: value_type.h:139
@ RUBY_T_OBJECT
Definition: value_type.h:115
@ RUBY_T_DATA
Definition: value_type.h:126
@ RUBY_T_FALSE
Definition: value_type.h:133
@ RUBY_T_UNDEF
Definition: value_type.h:136
@ RUBY_T_COMPLEX
Definition: value_type.h:128
@ RUBY_T_STRING
Definition: value_type.h:119
@ RUBY_T_HASH
Definition: value_type.h:122
@ RUBY_T_NIL
Definition: value_type.h:131
@ RUBY_T_CLASS
Definition: value_type.h:116
@ RUBY_T_ARRAY
Definition: value_type.h:121
@ RUBY_T_MASK
Bitmask of ruby_value_type.
Definition: value_type.h:144
@ RUBY_T_RATIONAL
Definition: value_type.h:129
@ RUBY_T_ZOMBIE
Definition: value_type.h:141
@ RUBY_T_BIGNUM
Definition: value_type.h:124
@ RUBY_T_TRUE
Definition: value_type.h:132
@ RUBY_T_FLOAT
Definition: value_type.h:118
@ RUBY_T_STRUCT
Definition: value_type.h:123
@ RUBY_T_NONE
Non-object (swept etc.)
Definition: value_type.h:113
@ RUBY_T_REGEXP
Definition: value_type.h:120
@ RUBY_T_FILE
Definition: value_type.h:125
void * ruby_xrealloc(void *ptr, size_t newsiz)
Resize the storage instance.
Definition: gc.c:14191
void * ruby_xrealloc2(void *ptr, size_t newelems, size_t newsiz)
Identical to ruby_xrealloc(), except it resizes the given storage instance to newelems * newsiz bytes...
Definition: gc.c:14201
void ruby_xfree(void *ptr)
Deallocates a storage instance.
Definition: gc.c:12226
void * ruby_xmalloc2(size_t nelems, size_t elemsiz)
Identical to ruby_xmalloc(), except it allocates nelems * elemsiz bytes.
Definition: gc.c:14171
void * ruby_xmalloc(size_t size)
Allocates a storage instance.
Definition: gc.c:14161
void * ruby_xcalloc(size_t nelems, size_t elemsiz)
Identical to ruby_xmalloc2(), except it returns a zero-filled storage instance.
Definition: gc.c:14181